public static IEnumerable <UserLoginMvoStateDto> ToUserLoginMvoStateDtoCollection(IEnumerable <UserLoginId> ids) { var states = new List <UserLoginMvoStateDto>(); foreach (var id in ids) { var dto = new UserLoginMvoStateDto(); dto.UserLoginId = new UserLoginIdDto(id); states.Add(dto); } return(states); }
public UserLoginMvoStateDto Get(string id, string fields = null) { try { var idObj = UserLoginMvosControllerUtils.ParseIdString(id); var state = (UserLoginMvoState)_userLoginMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new UserLoginMvoStateDto(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = UserLoginMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public static CreateUserLoginMvoDto ToCreateUserLoginMvo(this UserLoginMvoStateDto state) { return(state.ToCreateUserLoginMvo <CreateUserLoginMvoDto>()); }
public static MergePatchUserLoginMvoDto ToMergePatchUserLoginMvo(this UserLoginMvoStateDto state) { return(state.ToMergePatchUserLoginMvo <MergePatchUserLoginMvoDto>()); }
public static DeleteUserLoginMvoDto ToDeleteUserLoginMvo(this UserLoginMvoStateDto state) { return(state.ToDeleteUserLoginMvo <DeleteUserLoginMvoDto>()); }
public static IUserLoginMvoCommand ToCreateOrMergePatchUserLoginMvo(this UserLoginMvoStateDto state) { return(state.ToCreateOrMergePatchUserLoginMvo <CreateUserLoginMvoDto, MergePatchUserLoginMvoDto>()); }