I’ve written a number of posts detailing running and working with stored procedures in Entity Framework 6.x. Yesterday, I ran into a weird issue.
Ramblings of a software developer..
posted on June 16, 2016 by long2know in ASP.NET, Database, Entity Framework
I’ve written a number of posts detailing running and working with stored procedures in Entity Framework 6.x. Yesterday, I ran into a weird issue.
posted on May 23, 2016 by long2know in Database, Entity Framework
Over the weekend, I needed to be able to execute a stored procedure from EntityFramework that had a table value parameter (TVP) as an input.
I had never worked with TVP’s before. Utilizing them was not obvious to me from either a code-based approach or even directly with T-SQL. Here’s how I accomplished it, though.
posted on April 14, 2016 by long2know in ASP.NET, Database, Entity Framework
Earlier today, I needed to be able to retrieve progress indicators from a long-running stored procedure. The procedure itself executed many different queries, so the idea of sending messages to the client between those queries seemed like a good place to start.
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 20, 2015 by long2know in LINQ
I’ve said it before, and it bears repeating. LINQ is one of those features in .NET that keeps me using it. In-line queries that allow you to expressively search lists, with the declarative query syntax, is very appealing. Sure, under the covers, it’s performing the heavy lifting, iteration, and such, but the SQL-like lambda expressions are incredibly powerful.
However, sometimes we need something even more dynamic.
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 September 3, 2015 by long2know in Database
Often in dealing with data in a normalized database, aggregate data is stored on within a parent table. This is done to simplify display of data and general querying.
However, it can cause data to become out of sync if the child tables are edited.
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.