zzz projects Entity Framework 6 EF 6
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Articles

17 results for:

EF6 - AsNoTracking

EntityFramework AsNoTracking - Why do I need to know this?...This week I came across a problem with a client that is very common and causes a lot of drawbacks since it involves various concepts of how EF works....When you create a context for EF and indicate the mapping classes, you basically tell it that all objects must be tracked. The simple fact that you create an object or read from the context puts this object in the ...ChangeTracker.......Let's consider the following context:...View the c...
carloscds article asnotracking change-tracker

EF6 - Code First

Entity Framework - Code First...In the ...previous post..., I talked about how to work with Entity Framework using the Designer, a class model created from an ...EDMX... file. This model works perfectly in different types of projects, but the big drawback is having an ...EDMX... file for each database in your project....So let's now take a different approach, but not that different from the previous article. Our need is still to maintain the isolation of the database and to work only with object...
carloscds article code-first

EF6 - Code First from Database!

EntityFramework - Reading your database with Visual Studio 2013 Update 2...Some time ago, I made a post talking about how to ...take advantage of your existing database with EntityFramework Power Tools..., but the Power Tools model does not allow you to choose the tables or views you want to read, and sometimes this is very useful....With the release of Visual Studio 2013 Update 2, and also EntityFramework 6.1, a new option was added in the data sources. It now allows making ...reverse engineeri...
carloscds article code-first power-tools reverse-engineering

EF6 - Code First Migrations

Entity Framework Code First – Migrations...One of the great features of Entity Framework Code First is the process of automatically updating the database through the feature called ...Migrations.......Migrations allow you, who already work with CodeFirst, to generate manageable updates in your database, or if you prefer, let Migrations itself take care of everything automatically, keeping your database always up to date with your classes....In practice, we have two ways of working with Migrati...
carloscds article migration

EF6 - Connection Strings

EF CodeFirst - Managing Connection Strings...Today we're going to talk a little bit about managing connection strings in Entity Framework Code First, a very simple and quick way to create a relational object mapping in C # with Visual Studio 2010....If you still don't know EF Code First, see my ...post.......What I will deal with in this post is how we can store the connection strings and providers that allow EF access to our database. By default, when creating an EF context, a connection string...
carloscds article connection-string

EF6 - Creating Index

Creating indexes in Entity Framework Code First...As of EntityFramework version 6.1, it is possible to create ...index... in the database, specifying this directly in the classes in the source code. This creation of the indexes is carried out through the ...Index... attribute directly to the class property. But beware: this is only possible using EntityFramework's Migrations feature....To demonstrate this feature, let's create a Console project in Visual Studio and add the Entity Framework Code ...
carloscds article index code-first

EF6 - Designer

Working with Entity Framework Designer...Today, in a development project, it is very common for the programmer to have to know several database commands (...Insert..., ...Delete..., ...Update..., ...Select...) to be able to develop, in addition to knowing about the programming language. EntityFramework comes to help with this task, creating a correspondence between the database tables, what we call ORM, or Object-Relational mapping....There are, basically, two ways to work with Entity Framework,...
carloscds article designer

EF6 - EFProfiler

EFProfiler - Entity Framework Profiler...If you are working with EF4, you have probably wondered if the generated SQL commands are really optimized, or maybe when you have a performance problem. To answer that, several analysis tools or profilers exist, and one of these is the ...EFProfiler.......The tool is quite simple. You download an executable from the website ...EF Profiler... and follow the instructions contained in the file "How to use.txt"....For the profiler to work, you need to add a ...
carloscds article profiler

EF6 - Generic Query with LINQ

Generic queries with Linq...In the concept of object orientation, we always have in mind to create codes that can be reused within the application or even in different applications. In this context, I have been asked how it is possible to use ...LINQ..., which is totally object-oriented and strongly typed, and still create reusable codes....Taking advantage of this situation, I will show how it is possible to create a query method using ...LINQ..., which is used to query practically any entity (...
carloscds article linq query

EF6 - Harnessing your Database

EntityFramework - Harnessing your Database with Power Tools...When a company decides to adopt an ORM tool (Relational Object Mapping - in our case EntityFramework), a big paradigm break begins, as you will no longer access the database directly (...Select..., ...Insert..., ...Update..., ...Delete..., etc.), and will start to work only with classes and objects. That makes development much easier and more productive since you don't have to worry about the commands that go to the database, as this ...
carloscds article power-tools

EF6 - Interceptor

Entity Framework - Interceptor Configuration...One of the new features of Entity Framework 6 is the possibility of configuring our model using code instead of the traditional configuration files (...app.config... / ...web.config...). Also, we now have many other configurations that can be modified using the DbConfiguration class....Among the various configuration options we have through ...DbConfiguration..., there is an Interception feature (see more ...here...), where we can intercept several ...
carloscds article interceptor logger

EF6 - Logging SQL Commands

Entity Framework 6 - Logging SQL Commands...Entity Framework 6 RC has already been released! Now is the time to start working on migrating from version 5 to 6 and see the new features. Specifications on the new features can be found ...here.......Among the many new features, which we will explore in the following posts, today I will highlight one that I find very interesting: the command log sent to the database....An ORM (Object-Relational Mapping), translates commands from a programming langua...
carloscds article logging

EF6 - NGen to Improve Load Time

Improving Entity Framework load times with NGEN...Beginning with Entity Framework 6, all EF components are contained within the ...EntityFramework.dll... and are no longer divided between various .NET Framework components. Therefore, the EF DLL is not optimized for the JIT (Just in Time) of the computer where it is being run, just as .NET is....We can improve this by running the ...Ngen.exe... command, which pre-compiles the DLL and eliminates this process while loading the DLL. This way, the ch...
carloscds article ngen

EF6 - NGen to Improve Performance

Improving Entity Framework performance with NGen...In another post, I introduced very quickly about ...NGen..., which serves to pre-compile an application's assemblies, doing the work of JIT (Just in Time Compiler) in advance....Just to remind you a little, the figure below shows the process of running an application in .NET:...In a natural process of development in .NET, what happens is basically what is in the figure above, you write your code, compile it, and then execute it. But in execution...
carloscds article ngen

EF6 - Nightly Builts

Entity Framework 6 - Working with Nightly Builds...Now returning to write more about the Entity Framework, we are waiting for the new version 6 (still with no definitive date to be released) that will bring very significant improvements, and we will explore some of them in the next articles....The first thing is how to install EF 6 on a project. Usually, you use the Nuget Package Console to add EF to your project, with the following command: (open the Tools -> Library Package Manager -> ...Packa...
carloscds article nightly-built

EF6 - Power Tools

Entity Framework Power Tools in Visual Studio 2015...If you use EF Code First a lot like me and are already in Visual Studio 2015, you must have missed EF Power Tools. Unfortunately, it has not yet been ported to this version of Visual Studio....But calm down, there is a way to install the current version in VS 2015. To do this, first, download the ...Visual Studio Galery... component. See in the image below that it does not support VS 2015:...Now comes the trick ......I don't know if you know, ...
carloscds article power-tools

EF6 - Stored Procedure

EF Code First - Accessing Stored Procedures...I'll start this post by stating that Entity Framework Code First does not have native support for Stored Procedures, yet!...But if it is not supported natively, then how is it possible to access them? Through the context's ...SqlQuery()... method. But there is a drawback: access is linked to the database provider! Each database provider has a specific way of calling and treat stored procedure parameters....In our example, we will demonstrate how to a...
carloscds article stored-procedure code-first

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

Try for free now