Example #1
0
 protected void DataPortal_Create(Criteria.UserInfoCriteria criteria)
 {
     using (var dalManager = DalFactory.GetDalManager())
     {
         var userDal = dalManager.GetProvider <IUserDal>();
         var result  = userDal.New(criteria);
         if (!result.IsSuccess)
         {
             Exception error = result.GetExceptionFromInfo();
             if (error != null)
             {
                 throw error;
             }
             else
             {
                 throw new CreateFailedException(result.Msg);
             }
         }
         UserDto dto = result.Obj;
         LoadFromDtoBypassPropertyChecks(dto);
     }
 }
Example #2
0
        public static async Task <UserEdit> NewUserEditAsync(Criteria.UserInfoCriteria criteria)
        {
            var result = await DataPortal.CreateAsync <UserEdit>(criteria);

            return(result);
        }
Example #3
0
 /// <summary>
 /// Creates a new UserEdit sync with the given userInfoCriteria
 /// </summary>
 public static UserEdit NewUserEdit(Criteria.UserInfoCriteria criteria)
 {
     return(DataPortal.Create <UserEdit>(criteria));
 }