ADO.NET entity is an ORM (object relational mapping) which creates a higher abstract object model over ADO.NET components. So rather than getting into dataset, datatables, command, and connection objects as shown in the below code, you work on higher level domain objects like customers, suppliers, etc. DataTable table = adoDs.Tables[ 0 ]; for ( int j = 0 ; j < table.Rows.Count; j++) { DataRow row = table.Rows[j]; // Get the values of the fields string CustomerName = ( string )row[ " Customername" ]; string CustomerCode = ( string )row[ " CustomerCode" ]; } Benefits of using EF The main and the only benefit of EF is it auto-generates code for the Model (middle layer), Data Access Layer, and mapping code, thus reducing a lot of development time. The importance of EDMX file in Entity Framework EDMX (Entity Data Model XML) is an XML file which contains all the mapping details of how your objects map ...
Trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view. These triggers fire when any valid event is fired, regardless of whether or not any table rows are affected. For more information Types of DML Triggers AFTER trigger AFTER triggers are executed after the action of the INSERT, UPDATE, MERGE, or DELETE statement is performed. AFTER triggers are never executed if a constraint violation occurs INSTEAD OF trigger INSTEAD OF triggers override the standard actions of the triggering statement. Therefore, they can be used to perform error or value checking on one or more columns and the perform additional actions before insert, updating or deleting the row or rows. For example, when the value being updated in ...
. how to configure email's setting to sending email by user account. I have sent a email to user when his/her registration time. In this exam. ,I have sent email address, username, password and user verify link.. I have used a snippet code of email sending. First of all, I have add the emailId,password and smpt details in web.config file. <configSections> <appSettings> <add key="EmailHost" value="smtp.gmail.com" /> <add key="EmailPort" value="587" /> <add key="NoReplyEmail" value="adc@gmail.com" /> <add key="NoReplyPassword" value="password" /> <add key="NoReplyEmailDisplayName" value="display name" /> <add key="Sitename" value="site name"/> <add key="StationeryPath" value="Content\Stationery\" /> </appSettings> <connectionStrings...
Comments
Post a Comment