Pooja Singh
What is Entity Framework and Benefit of Entity Framework?
By Pooja Singh in ADO.NET on Jul 06 2016
  • Lawrence Peters
    Apr, 2017 24

    Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write. Entity Framework allows you to create a model by writing code or using boxes and lines in the EF Designer. Both of these approaches can be used to target an existing database or create a new database. This short video explains the differences and how to find the one that is right for you.

    • 2
  • Kalyani Shevale
    Jul, 2019 30

    Entity Framework Features
    Cross-platform: EF Core is a cross-platform framework which can run on Windows, Linux and Mac.
    Modelling: EF (Entity Framework) creates an EDM (Entity Data Model) based on POCO (Plain Old CLR Object) entities with get/set properties of different data types. It uses this model when querying or saving entity data to the underlying database.
    Querying: EF allows us to use LINQ queries (C#/VB.NET) to retrieve data from the underlying database. The database provider will translate this LINQ queries to the database-specific query language (e.g. SQL for a relational database). EF also allows us to execute raw SQL queries directly to the database.
    Change Tracking: EF keeps track of changes occurred to instances of your entities (Property values) which need to be submitted to the database.
    Saving: EF executes INSERT, UPDATE, and DELETE commands to the database based on the changes occurred to your entities when you call the SaveChanges() method. EF also provides the asynchronous SaveChangesAsync() method.
    Concurrency: EF uses Optimistic Concurrency by default to protect overwriting changes made by another user since data was fetched from the database.
    Transactions: EF performs automatic transaction management while querying or saving data. It also provides options to customize transaction management.
    Caching: EF includes first level of caching out of the box. So, repeated querying will return data from the cache instead of hitting the database.
    Built-in Conventions: EF follows conventions over the configuration programming pattern, and includes a set of default rules which automatically configure the EF model.
    Configurations: EF allows us to configure the EF model by using data annotation attributes or Fluent API to override default conventions.
    Migrations: EF provides a set of migration commands that can be executed on the NuGet Package Manager Console or the Command Line Interface to create or manage underlying database Schema.**

    • 1
  • Pooja Singh
    Jul, 2016 6

    Entity Framework basically generates business object & entities according to the database table & provide some mechanism. 1)perform basic crud(create,read,update,delete) 2)ability to have inheritance relationship between entities. *Benefit The main & only benefit of entity framework is it is auto-generate code for model(middle layer) data access lyer & mapping code, thus reduced lot of development time.

    • 1
  • Amir Khan
    Mar, 2019 6

    Benfits of Entity framework is that it create automaticatically connection with database and close .In ado.net we must create connection with database manually and close .it increase perfomance of developers

    • 0
  • Amir Khan
    Mar, 2019 6

    First it is new version of ado.net and entity framework is ORM Object Relational Mapper is structured layer where the function are already defined then we these function through namespaces

    • 0
  • Sandeep Kumar
    Feb, 2018 28

    Entity Framework is ORM tool.It use to interact to DB

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS