EF code first is code plane?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 anni tempo fa
i think code first is not good for big database. sql server has a lot of feature that DBA use to optimise complicated queries.
code first is good strategies for provider database to avoide buy sql licence. but you lost a lot of feature as store procudures, user function,...
for simple query is usefull to create query with LINQ but for reports or some cases is so hard to optimise LINQ queries.
i want to know other idea.
12 anni tempo fa
EF Code First is a hughe time saver and makes the code more flexible and maintainable, but when it comes to performance and complex queries there's no substitute for SQL, both can be combined to build a robust and fast solution, since you can build procedures that return entities, that's what I do in my own solutions, when a query is too complex to be written and performed by LINQ just build a procedure that is bound to an entity.
12 anni tempo fa
is not possible to use sp when you use code first.
and in some cases you want to use datatypes that just supported with sql.
12 anni tempo fa
When project size goes up, develop team needs to take care of performance, which is very important for any of online transaction application, i dont think Code First is a good way to control it, it makes a convenient way for programmer but personally I do not recommend it for transaction related project.
12 anni tempo fa
iman_ad wrote:
is not possible to use sp when you use code first.
and in some cases you want to use datatypes that just supported with sql.


iman_ad it is possible to use a stored procedure when using code first. Also many high profile companies make limited use of stored procedures. I'm not going to argue for or against stored procedures (although my official stance is that I'll add a stored procedure when I can prove it will help my website performance). A quick google returns many results for how to make code first work with stored procedures. One more thing, nopCommerce source is freely available with a majority of features already written. Developers can spend the time replacing queries with stored procedures instead of writing new features if that is really important to your application.

I think instead of complaining about the lack of stored procedures you should just add them in your project and be done with it. I'm sure nopCommerce will add stored procedures as they see fit (performance optimizations, etc.), but as stated many times before the change to lose stored procedures was intentional.

http://andy.edinborough.org/Reading-Entity-Framework-Code-First-Objects-from-a-Stored-Procedure
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.