public override ResultOperation Save(Pet entity) { ResultOperation result = new ResultOperation(); try { Repository.SavePet(entity); result.Success = true; } catch (Exception ex) { result.Success = false; result.Errors.Add(ex.Message); } return(result); }
public override ResultOperation Save(User entity) { ResultOperation result = new ResultOperation(); try { if (entity.ChangePassword) { entity.Password = GetPasswordHash(entity.Password); } Repository.SaveUser(entity); result.Success = true; } catch (Exception ex) { result.Success = false; result.Errors.Add(ex.Message); } return(result); }