If you recall my previous previous post Stored Procs with Entity Framework, I mentioned that you could use SqlQuery<T> to populate a list from a stored procedure.
However, I found that optional parameters must be handled properly.
Ramblings of a software developer..
posted on March 22, 2016 by long2know in ASP.NET, Database, Entity Framework
If you recall my previous previous post Stored Procs with Entity Framework, I mentioned that you could use SqlQuery<T> to populate a list from a stored procedure.
However, I found that optional parameters must be handled properly.
posted on February 23, 2016 by long2know in Database, Entity Framework
Entity Framework has a nice feature that allows for child navigation properties/collections to be automatically loaded. Essentially, this translates into SQL table joins.
I know this is old news, but I wanted to share a brief experience while updating my own base repositories.
posted on October 4, 2015 by long2know in Database, Entity Framework
Late last week, I ran into an interesting problem. My current web-based project allows users to perform bulk operations on various database records – up to 1000 records at a time. When dealing with a small number of records, performance was adequate. However, when working with 1000 records, performance was completely unacceptable.
posted on September 10, 2015 by long2know in Database, Entity Framework
Entity Framework makes it possible to execute scalar-valued functions when querying models. However, it’s not very intuitive to get this working, and it’s not directly possible to map the returned scalar value to an instance of your model. Odd, right?
posted on August 18, 2015 by long2know in Database, Entity Framework
Entity Framework uses the Unit of Work pattern. It’s useful, but it doesn’t quite cover all of the bases.
In using a repository pattern, I rely on EF to simply deal with UOW and have not had occasion to go beyond UOW. However, on a recent project, I found that I needed to manage my own transactions.
posted on May 15, 2015 by long2know in ASP.NET, Azure, Database, Entity Framework, Microsoft
I’m still playing with Azure and getting a full fledged application working and hosted using the Azure services. As I showed yesterday, setting up a Web App is pretty easy.
The next step for me involves moving an Entity Framework Database using Migrations to Azure.
posted on April 27, 2015 by long2know in ASP.NET, Database, Entity Framework
In my previous post discussing profiling Entity Framework, I alluded to DbInterceptors as being able to provide lots of useful functionality. In this post I’ll expand on the DbInterceptor and show a few optimizations / manipulations that I like to perform on EF’s generated queries.
posted on April 24, 2015 by long2know in ASP.NET, Entity Framework
Profiling a ‘black box’ framework to see exactly how it works and behaves can be edifying. It can also lead to better optimizations/usage of the framework. In my case, it helped diminish the mistrust of Entity Framework.
There are tools like Rhinomocks EF Profiler which allow for inspecting the ObjectContext of Entity Framework. However, if you don’t want to buy additional tools, you can effectively write your own.
posted on April 23, 2015 by long2know in ASP.NET, Database, Entity Framework, Web
Using Stored Procedures in the latest version of Entity Framework is pretty doable. You lose a lot in terms of flexibility, but sometimes there are trade-offs that one must make. This week I was playing around with converting an application that used a Repository pattern with EF, Lambdas, and IQueryables to StoredProcs for all CRUD operations.
Here are some interesting bits that I learned.