Views: 4.6K
Replies: 1
Archived
|
Patterns in Action or Spark Code FirstFirst of all, Good Job on gathering the information for the .NET Design Pattern Framework, It's exactly what i was looking for.
My question is, as question subject is already saying it, do you guys have any plans or idea to implement or show how to implement Code first approach using EF in Patterns in Action project or Spark framework? Or if there is any possibility for any example for this purpose will also work. Thank You Xeon Xi, Apr 21, 2016
|
|
Reply 1Xeon, thank you for your question.
Yes, we can easily add Code First and we are considering doing this for the next release. Particularly because Code First is what EF Core supports out of the box. However, we're a bit hesitant because Code First is not a good approach when you need to build high-performance, production quality web sites. With Code First you have little or no control over 1) the data model, 2) data access, and 3) database tuning. The database is merely a 'persistence layer' (i.e. data dump) which is a big red flag -- we write about this in our SQL + Database Design Pattern Framework. In general, when an application does not perform well there is a 95% chance its related to the database (i.e. data model and data access). Also, EF is not particularly well known for its performance which explains why Microsoft decided to rewrite it from scratch. Fortunately, EF Core is a much more lightweight and agile than prior versions. Having said this, we have written Patterns in Action with EF Core, and I must say, searching with dynamic WHERE and ORDER BY clauses remains very problematic. For this and many other reasons we feel that our SPARK platform offers a much better (and faster) approach to data access. We do recognize that most C# projects will end up using EF, so we will support it (including Code First).. Jack Poorte, Apr 23, 2016
|