Exemplo n.º 1
0
        public UserServices(IInventoryAAARepository <dbentities.UserDetail> userDetailServices,
                            IInventoryAAARepository <dbentities.UserRoleDetail> userRoleDetailServices,
                            IInventoryAAARepository <dbentities.UserInformationDetail> userInformationDetailServices,
                            IInventoryAAARepository <dbentities.UserMenuRoleDetail> userMenuRoleServices,
                            IInventoryAAARepository <dbentities.MenuDetail> menuServices)
        {
            this._userDetailServices            = userDetailServices;
            this._userRoleDetailServices        = userRoleDetailServices;
            this._userInformationDetailServices = userInformationDetailServices;
            this._userMenuRoleServices          = userMenuRoleServices;
            this._menuServices = menuServices;

            this.userDetails            = new dbentities.UserDetail();
            this.userRoleDetails        = new dbentities.UserRoleDetail();
            this.userInformationDetails = new dbentities.UserInformationDetail();
        }
Exemplo n.º 2
0
        public static dbentities.UserDetail DtoToEntity(this UserDetailRequest request)
        {
            dbentities.UserDetail entity = null;

            if (request != null)
            {
                entity = new dbentities.UserDetail
                {
                    UserID       = request.UserId,
                    UserName     = request.UserName,
                    Password     = request.Password,
                    UserRoleID   = request.UserRoleId,
                    IsActive     = request.IsActive,
                    CreatedBy    = request.CreatedBy,
                    CreatedTime  = request.CreatedTime,
                    ModifiedBy   = request.ModifiedBy,
                    ModifiedTime = request.ModifiedTime
                };
            }

            return(entity);
        }