CodeSmith Community
Your Code. Your Way. Faster!

heavy entities

Latest post 09-12-2007 7:37 AM by shabrandi. 0 replies.
  • 09-12-2007 7:37 AM

    heavy entities

    dear

    your framework is good but entities are heavy ... you can define only properties in entity and some helper calss to insert,update,delete and fetch them such as below:

    [Serializable()]

    public class EbCustomers : BusinessEntity

    {

    public const string tagCutomerid = "tagCutomerid";

    public const string tagCompanyname = "tagCompanyname";

    public const string tagCoContactName = "tagCoContactName";

     

     

    public EbCustomers(bool setNull): base("EbCustomers", "EbCustomers", setNull)

    {

    base.PrimaryKeyObjObject = (pi = new EbCustomersPKey());

    }

    protected EbCustomers(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)

    : base(info, context)

    {

    base.PrimaryKeyObjObject = (pi = new EbCustomersPKey());

    }

     

    EbCustomersPKey pi = null;

    public EbCustomersPKey PI

    {

    get

    {

    return (EbCustomersPKey)this.PrimaryKeyObjObject;

    }

    }

    public override bool GUIDSupport

    {

    get

    {

    return false;

    }

    }

     

    [
    EntityField(tagCustomerid, Priority = 3)]

    [Browsable(false)]

    [DesignerSerializationVisibility(0)]

    public string Customerid

    {

    get

    {

    return (string)GetFieldValue(tagCustomerid);

    }

    set

    {

    SetFieldValue(tagCustomerid, value);

    }

    }

    [
    EntityField(tagCompanyName, Priority = 2)]

    [Browsable(false)]

    [DesignerSerializationVisibility(0)]

    public string CompanyName

    {

    get

    {

    return (string)GetFieldValue(tagCompanyName);

    }

    set

    {

    SetFieldValue(tagCompanyName, value);

    }

    }

    [
    EntityField(tagContactName, Priority = 1)]

    [Browsable(false)]

    [DesignerSerializationVisibility(0)]

    public string ContactName

    {

    get

    {

    return (string)GetFieldValue(tagContactName);

    }

    set

    {

    SetFieldValue(tagContactName, value);

    }

    }

    }

    please correct me if i'm wrong

    Filed under:
    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems