Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / entity-framework

Entity Framework

entity-framework

Great Reads

by Akhil Mittal
Repository pattern in MVC3 application with entity framework
by JawadHasan
Use NoSQL database functionality from within a Relational database system
by Mark Pelf
NET8/EF8 Breaking Change. Old servers/databases might not understand queries from EF8.
by tranthanhtu.vn
[TinyERP: SPA for Enterprise Application]Manage Staffs - Part 2

Latest Articles

by Akhil Mittal
Repository pattern in MVC3 application with entity framework
by JawadHasan
Use NoSQL database functionality from within a Relational database system
by Mark Pelf
NET8/EF8 Breaking Change. Old servers/databases might not understand queries from EF8.
by tranthanhtu.vn
[TinyERP: SPA for Enterprise Application]Manage Staffs - Part 2

All Articles

Sort by Score

entity-framework 

by Michael Bogaerts
What brings the 15.2 release for XAF (win) developers
by Vinayaka Krishna Shenoy
From past few days i was doing some R & D on the upcoming Entity framework from Microsoft, and i found it was interesting in many ways,The first part which i liked the most is -Querying to the Entity Data Model(EDM) rather than the real data store.At a high level , we have plenty of...
by Ahmad F Hassan
An easy way to view hierarchical data in a simple ASP .NET Repeater
by Bhushan Mulmule
This is terribly unorganized document with mix of MVC, Entity Framework, LINQ, HTML 5 and JQuery how tos...
by Igor_A
An architectural prototype of a business logic server as Windows Service. Sample service implementation and test utility.
by Nadege Rouelle
Let's see how to define our own database name using Entity Framework Code First
by Matthew Givens
How to change databases at run-time in a user-friendly manner.
by jonx
Very good stuff. Learned me a lot about how to access to the physical structure of the query.There is also a CopyToDataTable : http://msdn.microsoft.com/en-us/library/bb386921.aspx[^]And for the record here is a C# version:protected DataTable EntityToDatatable(IQueryable Result,...
by Uladzislau Baryshchyk
Application that can be used to work with subd and connecting Amazon RDS to the project
by Islam Refaei
How to create contained DB users to be used among your application
by Jean Carlo S. Passos
CRUD over Association Entity that maps to association tables
by sathya88
A simple framework for data validation using data annotations at entity level.
by Mostafa Asaduzzaman
How to migrate database in Entity Framework 7 and Visual Studio 2015
by DiponRoy
Delete all the records from the table using EF
by Maninder Singh Puhi
Appropriate query to fetch required no of results from DB instead of getting all at on time for binding controls like Gridview, listview etc
by Randy Kroeger
Created a POC that dynamically builds a predicate using Expression and Reflection.
by #realJSOP
When you have a customized DbContext constructor.
by Wael Al Wirr
PostgreSQL exception 42P01
by Abhay@Accenture
Performance tuning using SqlBulkCopy
by ChristineBoersen
A technique to return dynamic data from a SQL Query using Entity Framework 7
by Norman Paterson
Performance issue using ROW_NUMBER() OVER in a database view for the PK
by Soulus83
Unique constraints
by DiponRoy
How to handle database scheme changes with normal SQL scripts, without migration in Entity Framework code first
by Nejimon CR
A simple possible solution to Entity Framework Code First Navigation Property/Related Records not being loaded automatically
by DiponRoy
EF Core first publishing multiple DB contexts in same DB
by Fiyaz Hasan
This article shows you how to work with database triggers in entity framework core using a third party library.
by OrlandoCurioso
An EF base DbContext that provides detailed information on current and totalized changes
by Alen Toma
Entity Framework Dynamic include hierarchy
by Valentino_Lokesh
Migrations enabled in Class Library (Data Access Layer) and the same is referenced to MVC ProjectNo need to maintain the Data Access and Model classes in the MVC Project. We can have separate Class library for Model and Data Access and have migrations enabled in Data Access where DbContext resides.
by Efe Erdoğru
An alternate method for multi db provider support for entity framework
by GuyThiebaut
Solving the "Store update, insert, or delete statement affected an unexpected number of rows (0)" response.
by Sherjil_Ahmed
Mixing DB-First and Code First Approach for using SPs in EF-Way
by MdAsifBd
Separate entity class mapping using Fluent API
by Alen Toma
EntityWorker.Core - an alternative to entity Framework
by Dukhabandhu Sahoo
Know how to exclude types from the Model in Entity Framework Code First
by Master DJon
New MigrationSqlGenerator to generate SQL from MigrationOperations having attribute "ExecuteAfter" or "ExecuteBefore"
by George Danila
An Extension Method that might help you copy over the values from one object to another, provided they are of the same type.
by Daniel Lo Nigro
As far as I know, the "UpdateModel" method is designed to do this. Something like this should work, but I haven't tested it:public ActionResult Edit(Entity entity){ var entityInDbSet = _context.Set.SingleOrDefault(x => x.Id == entity.Id); UpdateModel(entityInDbSet); ...
by Vinayaka Krishna Shenoy
I explored a bit more on Entity framework,during last week of 2009 and here goes my observations on how to extend the Entity Framework functionality if you want to customize the normal/ideal flow of Entity framework execution engine.1) OnContextCreatedBy default a declaration of this...
by Nathan Minier
Generic AddOrUpdate for EF with composite key support
by Arun Chandrasekhara Pillai
Generic JqGrid implementation in MVC with custom filtering and dynamic sorting
by Bankey Sharma
Converting DataReader Result into List of Objects Using Generic Type, Property Attribute and Reflection
by Harry von Borstel
How to get an Entity Framework object - either from ObjectContext, from database or from scratch
by Ger Hayden
These notes are based on my experience getting started with IdentityServer4.
by David_Cui
To introduce a free library to save some tedious work for writing mapping code between entities and DTOs
by Puresharper
Lazy loading is a nice feature but sometimes it is more efficient to eager fetch. However entity framework does not provide an easy way to do it.
by SRS(The Coder)
This tip gives an explanation with example on how to get output parameter value from stored procedure using Entity Framework in ASP.Net
by Ajit Hegde
This tip describes how to use ASP.NET identity entity framework with mysql database.
by retsnoM
Sample code showing how to implement IDbContextFactory for retrieving ConnectionString at runtime and trigger automatic migrations. For use with DI and IoC or if you have different databases with the same model.
by Fiyaz Hasan
Know how to use Entity Framework's new shadow property feature for easily implementing common audit fields for entities
by Pharylon
Connection Resiliency with EF 6
by Brady Kelly
How to improve the naming and change the naming and schema of all the Identity tables like AspNetUsers
by Bohdan Stupak
Here’s a workaround how to fix exception "DbContext has been disposed"
by Tony Sherlock
Snippet for Left Outer Join, Entity Framework
by santosh poojari
This is most general collection operation that we come across daily. Its set based operation using LINQ Except Operator.
by Mr Orange
Introduction...
by DiponRoy
The aim of this helper class is to divide a large IEnumerable into multiple small list.
by MaDOnos
Adapter implemantation to mock DbContext easily
by MaDOnos
How to mock EF DbContext and DbContextTransaction with Proxy
by mark_worrall
How to move Entity Framework Core v5.0 into a separate Visual Studio Project
by Ponkarthikeyan Thangavel
This article decries optimizing entity framework performance when using Code First approach with lazy loading enabled
by DiponRoy
Upgrade a legacy ASP.NET project to use managed Oracle.ManagedDataAccess.Client instead of unmanaged Oracle.DataAccess.Client while using Entity Framework DB first or EDMX.
by Mohsen Esmailpour
Organizing Fluent configurations into separate classes in EF Core 1.0
by Igor_A
Review of an approach of increase clustered server performance. Library sample and test utility.
by Lộc Nguyễn
On Chinook digital media store sample database
by Avinash Narnaware
How to create Pivot Table in SQL Server 2008 R2 and in C# Linq to Entity Framework in a step by step manner with two different instances.
by Dukhabandhu Sahoo
Learn how property is automatically mapped to column and how to manage it in entity framework code first.
by Harry von Borstel
Extension Method for exceptions that give a useful text even on Entity Framework Exceptions
by RobertFall
I was struggling recently with a problem I KNEW had to be solvable in a much easier way than replacing ALL the fields in my managed entity by hand and then saving it. I wanted a way that I could simply replace the managed entity with a new one that had been created from an XML document.Turns...
by Massimiliano Peluso "WeDev Limited"
Repository Pattern with Entity Framework 4.1 and Code First
by mkader
Dynamics CRM 2011 and BizTalk 2010 Server Integration - Retrieve Multiple Dynamics CRM 2011 Entity Records from BizTalk 2010 Server
by Alexandre Paula
aspnet Membership Login in any project you want.
by Super Lloyd
The title says it all! Make an outer join in 1 LINQ statement
by CyberMakarov007
SQL table dependency with entity framework in WPF
by DiponRoy
A utility class to send parameters for IN() operator in SQL using parameterized queries
by Member 10295860
Using stored procedure type for binding data to dataset in SSRS or adding entity to Entity data model
by Mina Talaat Ghaly
Add the auditing properties with one SQL query and fill them from one place.
by Richard Silveira
EntityFramework.MoqHelper library to work with Entity Framework 6 and Moq libraries doing mocks of Entity Framework main methods that access database.
by Dukhabandhu Sahoo
The use of different Database initializer options in Entity Framework Code First
by Wahid Bitar
Validated the unique constraints at dbContext ValidateEntity in a generic way by reading the IndexAttribute values.
by Md. Mainul Islam
This tip will show the ways to incorporate Entity Framework in .NET applications.
by dswersky
If you have Visual Studio 2010 Ultimate, you have some serious architectural tools. One of my favorites (so far) is the Dependency Graph.Select Architecture-Generate Dependency Graph and you'll see that you can generate a graph by Assembly, Namespace, Class, or Custom. Try the Assembly...
by Mark Pelf
Fix for adding new DB tables does not work in VS 2022, ver. 17.6.2, EF6 (Classic)