Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
What is an Entity?
Posted By :
Posted Date :
October 23, 2008
It is a 'thing' in the real world with an independent existence.
You can also find related Interview Question to
What is an Entity?
What is an Entity type?
It is a collection (set) of entities that have same attributes.
What is an Entity set?
It is a collection of all entities of particular entity type in the database.
What is an Extension of entity type?
The collections of entities of a particular entity type are grouped together into an entity set.
What is Weak Entity set?
An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.
Why struct is not used to hold entity instead of class?
(eventhough struct provides us properties, methods and interface support)
Struct is a value type and
Class is a reference type.
Struct is stored in Stack - so if you pass a struct as argument to method - a new struct will be created on stack and values will be copied - this is a time consumingp process in the order of n.
Class is stored in Heap - so the same reference can be passed to various methods without duplication.
Why can't struct be used instead of class for storing entity?
Struct is of value type. If we pass it across methods in layers, a new object will be created in the stack thus increasing memory and processing requirement.
So class should be used for creating entity like Employee, Supplier etc.
Why we use entity framework?
It has been start thhe connection automatically and also automatically close the connection.
Difference between NHibernate and Entity framework.
With NHibernate, one can do the below activity-
Send multiple updates/inserts/deletes at once,Load multiple proxies of a type at once, Load multiple collections of a type at once, Execute object oriented DML statements.
but these are not possible with EntityFramework.
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend