The Entity Data Model (EDM) uses three key concepts to describe the structure of data: entity type, association type, and property. These are the most important concepts in describing the structure of data in any implementation of the EDM.
Entity Type
In a conceptual model, An entity represents a specific object (such as a specific customer or order). Each entity must have a unique entity key within an entity set.
Association
In a conceptual model, an association represents a relationship between two entity types (such as Customer and Order).
Property
Entity types contains properties that define the structure and characteristics of Entities. For example, a Customer entity type may have properties such as CustomerId, Name, and Address.
Programming Tutorials on XHTML, CSS, JavaScript, JQuery, JSON, Python, Django, Amazon Web Services, ASP.NET, Web Forms, and SQL
Showing posts with label ADO.NET. Show all posts
Showing posts with label ADO.NET. Show all posts
Saturday, October 26, 2013
What are Advantages and Disadvantages of Entity Framework
There are several advantages and disadvantages of using Entity Framework.
Advantages
Advantages
- No need to write the Data access layer code. Entire Data access layer code will be generated by the Entity Designer (.edmx file).
- For small applications, no need to write Stored procedures for the CRUD opeartions (Insert,Update,Delete and modify). The Designer will provide the implementation. Developer need to consume those methods.
- Reduces development effort and Unit Testing effort.
- As the queries are dynamic there might be a hit in the performance of the application.
What is Microsoft ADO.NET Entity Framework
The Microsoft ADO.NET Entity Framework (EF) is an Object/Relational Mapping (ORM) framework that enables developers to work with relational data as domain-specific objects, eliminating the need for most of the data access plumbing code that developers usually need to write.
The Entity Framework works with Microsoft SQL Server and 3rd party databases through extended ADO.NET Data Providers, providing a common query language against different relational databases through either LINQ to Entities or Entity SQL.
The Entity Framework works with Microsoft SQL Server and 3rd party databases through extended ADO.NET Data Providers, providing a common query language against different relational databases through either LINQ to Entities or Entity SQL.
Tuesday, July 3, 2012
Create CLR Trigger
Steps for creating CLR Trigger
Follow these steps to create a CLR trigger of DML (after) type to perform an insert action:
Create a .NET class of triggering action
Make an assembly (.DLL) from that Class
Enable CLR environment in that database.
Register the assembly in SQL Server
Create CLR Trigger using that assembly
CLR Triggers
CLR Triggers
A CLR trigger could be a Date Definition or Date Manipulation Language trigger or could be an AFTER or INSTEAD OF trigger. Methods written in managed codes that are members of an assembly need to be executed provided the assembly is deployed in SQL 2005 using the CREATE assembly statement. The Microsoft.SqlServer.Server Namespace contains the required classes and enumerations for this objective.
A CLR trigger could be a Date Definition or Date Manipulation Language trigger or could be an AFTER or INSTEAD OF trigger. Methods written in managed codes that are members of an assembly need to be executed provided the assembly is deployed in SQL 2005 using the CREATE assembly statement. The Microsoft.SqlServer.Server Namespace contains the required classes and enumerations for this objective.
Monday, July 2, 2012
Role of .Net data provider
What is the role of data provider?
The .NET data provider layer resides between the application and the database. Its task is to take care of all their interactions. The .NET Data provider can be demonstrated to be:
SQL Server data provider
OLEDB data provider
ODBC Data Provider
ADO.NET supports the following OLE DB Providers:
- SQLOLEDB - Microsoft OLE DB Provider for SQL Server.
- MSDAORA - Microsoft OLE DB Provider for Oracle.
- Microsoft.Jet.OLEDB.4.0 - OLE DB Provider for Microsoft Jet.
Subscribe to:
Posts (Atom)