SQL SERVER – Concurrency Basics – Guest Post by Vinod Kumar.
What is Entity Framework?
Microsoft has given following definition:
The Microsoft ADO.NET Entity Framework 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. Using the Entity Framework, developers issue queries using LINQ, then retrieve and manipulate data as strongly typed objects. The Entity Framework’s ORM implementation provides services like change tracking, identity resolution, lazy loading, and query translation so that developers can focus on their application-specific business logic rather than the data access fundamentals.
Or simply: Entity framework is an Object/Relational Mapping (O/RM) framework. It is an enhancement to ADO.NET that gives developers an automated mechanism for accessing & storing the data in the database, and for working with the results, in addition to DataReader and DataSet.
Now the question is what is O/RM framework and why do we need it?
ORM is a tool for storing data from domain objects to relational database like MS SQL Server, in an automated way, without much programming. O/RM includes three main parts: Domain class objects, Relational database objects and Mapping information on how domain objects map to relational database objects (tables, views & storedprocedures). ORM allows us to keep our database design separate from our domain class design. This makes the application maintainable and extendable. It also automates standard CRUD operation (Create, Read, Update & Delete) so that the developer doesn’t need to write it manually.
Visit wikipedia for more information on Object-relational Mapping
There are many ORM frameworks for .net in the market like DataObjects.Net, NHibernate, OpenAccess, SubSonic etc. Entity Framework is an open source ORM framework from Microsoft.
Microsoft Exam .. 100% Free!! (EXPIRED!)
I’m Microsoft Certified Trainer (MCT), I can help you to get a free exam voucher for any of Microsoft exams.
Just send me your:
- First Name
- Last Name
- Microsoft Mail
Kindly, don’t do that unless you need to leave others to get the chance, reply on the same thread with the requested details and after registration you will get an email contains all of details which you want.
Notes:
- You’ve the chance to get one voucher only.
- You should use it before November 30, 2014.
- You cannot sell it, because it is assigned to you.
- Don’t use different mail to get more than one voucher, because of your records will be distributed on more than one transcript, it’s illegal issue.
- There’re limited seats, hurry up!
- Feel free to contact me (a.negm@outlook.com) if you want to get further info about the issue.
Returning JSON object from an ASP.NET page
I think that the web service is a good solution to do that, but what If do you be enforced to deal with JSON through ASP .NET.
You have a class “Product” as following, and you have an object “o” represents the class:
public class Product
{
public int ID { get; set; }
public string Name { get; set; }
public int Price { get; set; }
}
If you want to write Response.Write(x), you will get “namespace.Product”, and this is totally wrong. In brief, to do that you have to execute the following script in your code-behind page:
var o = new System.Web.Script.Serialization.JavaScriptSerializer();
System.Text.StringBuilder x = new System.Text.StringBuilder();
o.Serialize(new Product { ID = 1, Name = “Product abc”, Price = 1000 }, x);
Response.ContentType = “application/json”;
Response.Write(x);
You will get the following result: {“ID”:1,”Name”:”Note 2″,”Price”:1000}
Send mail from SQL database (Configure Database Mail)
Database mail is newly introduced concept in SQL Server 2005 and it is replacement of SQLMail of SQL Server earlier version. Database Mail has many enhancement over SQLMail. Database Mail is based on SMTP (Simple Mail Transfer Protocol) and also very fast and reliable where as SQLMail is based on MAPI (Messaging Application Programming Interface). Database mail depends on Service Broker so this service must be enabled for Database Mail. Database Mail can be encrypted for additional security. SQLMail is lesser secure as it can encrypt the message as well anybody can use SMTP to send email. Additionally, for MAPI to be enabled for SQLMail it will require Outlook to be installed. All this leads to potential security threat to database server.
In order to send mail using Database Mail in SQL Server, there are 3 basic steps that need to be carried out:
- Create Profile and Account
- Configure Email
- Send Email
10 Reasons why your employees hate you!!
Firstly, this topic is copied from here, and I know that it isn’t related to our blog major trend, but it is so important for you in your work environment.
In the world of employees, a good boss is differentiated from a bad boss by the way the boss makes the employees feel. They also assess the boss based on his or her contribution – or lack thereof – to their ability to get their jobs done successfully.
Employees tolerate a lot of bad boss behavior. Many bosses are untrained, uncaring, and not held accountable for their actions and interaction with employees. Some were promoted to jobs above their competence to perform. Bad management practices weigh heavily in whether your employees hate you.