public User Delete(int id) { var translator = new UserTranslator(); var user = this.userService.Delete(id); return(translator.ToViewModel(user)); }
public User Delete(User model) { var translator = new UserTranslator(); var user = this.userService.Delete(translator.ToDto(model)); return(translator.ToViewModel(user)); }
public User Get(int id) { var translator = new UserTranslator(); var userDto = this.userService.Get(id); return(translator.ToViewModel(userDto)); }
public User[] GetAll() { var translator = new UserTranslator(); var usersDto = this.userService.GetAll(); var users = new List <User>(); usersDto.ToList().ForEach(p => users.Add(translator.ToViewModel(p))); return(users.ToArray()); }