Setting class properties quickly

Posted by uzay95 on Stack Overflow See other posts from Stack Overflow or by uzay95
Published on 2010-04-04T15:07:00Z Indexed on 2010/04/04 15:13 UTC
Read the original article Hit count: 188

Filed under:
|

class UserClass{

    #region Class properties which are binding from DB
    .
    .
    .
    #endregion


    #region Constructor Methods
    public UserClass(int _iUser_id)
    {
        // of course this is wrong but how can i quickly set properties 
        // which are coming from DB by extension method over context class?
        this = DAO.context.GetById<UserClass>(_iUser_id);
    }
    #endregion
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about class