POCO means Plain old C# object. When EDMX creates classes they are cluttered
with lot of entity tags. For instance below is a simple customer class generated
using entity framework. Many times we would like to use simple .NET classes and
integrate the same with entity framework.
Entity framework allows the same. In other you can create a simple .NET
class and use the entity context object to load your simple .NET classes.
[EdmEntityTypeAttribute(NamespaceName="CustomermytestModel",
Name="Customer")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class
Customer : EntityObject
{
#region Factory
Method
/// <summary>
/// Create a new
Customer object.
///
</summary>
/// <param
name="id">Initial value of the Id property.</param>
/// <param
name="customerCode">Initial value of the CustomerCode
property.</param>
/// <param
name="customername">Initial value of the Customername
property.</param>
public static
Customer CreateCustomer(global::System.Int32 id, global::System.String
customerCode, global::System.String customername)
{
Customer
customer = new Customer();
customer.Id =
id;
customer.CustomerCode = customerCode;
customer.Customername = customername;
return
customer;
}
#endregion
#region Primitive
Properties