예제 #1
0
 public static UserAccountAllParamDto ToPostUserWhithAllParam(this UserAccountAllParam param)
 {
     if (param == null)
     {
         return(null);
     }
     return(new UserAccountAllParamDto
     {
         idUser = param.IdUser,
         firstName = param.FirstName,
         surName = param.SurName,
         lastName = param.LastName,
         password = param.Password,
         email = param.Email,
         postalAddress = param.PostalAddress,
         postalCode = param.PostalCode,
         city = param.City,
         country = param.Country,
         urlPicture = param.UrlPicture,
         isAdmin = param.IsAdmin
     });
 }
예제 #2
0
        internal static UserAccountViewModel ToGetUserAccountByLogin(this UserAccountAllParam userAccountAllParams)
        {
            if (userAccountAllParams == null)
            {
                return(null);
            }

            return(new UserAccountViewModel
            {
                IdUser = userAccountAllParams.IdUser,
                FirstName = userAccountAllParams.FirstName,
                LastName = userAccountAllParams.LastName,
                SurName = userAccountAllParams.SurName,
                Email = userAccountAllParams.Email,
                PostalAddress = userAccountAllParams.PostalAddress,
                City = userAccountAllParams.City,
                Country = userAccountAllParams.Country,
                PostalCode = userAccountAllParams.PostalCode,
                Password = userAccountAllParams.Password,
                UrlPicture = userAccountAllParams.UrlPicture,
                IsAdmin = userAccountAllParams.IsAdmin
            });
        }
 public async Task UpdateUserAccount(UserAccountAllParam param)
 {
     //UserAccountAllParamDto dto = param.ToPutUserAccountAllParam();
     await UserAccountRepository.UpdateUserAccount(param.ToPutUserAccountAllParam()).ConfigureAwait(false);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public async Task PostUserWhithAllParam(UserAccountAllParam param)
 {
     UserAccountAllParamDto dto = param.ToPostUserWhithAllParam();
     await UserAccountRepository.CreateUserWhithAllParam(dto).ConfigureAwait(false);
 }