Ejemplo n.º 1
0
 public bool Delete(UserProfile entity)
 {
     try
     {
         _repo.Delete(entity);
         _repo.Save();
         return true;
     }
     catch (Exception ex)
     {
         ValidationDic.Clear();
         ValidationDic.Add("Exception", ex.Message);
         return false;
     }
 }
Ejemplo n.º 2
0
 public bool Create(UserProfile entity)
 {
     throw new NotImplementedException("Use web security to create a user");
 }
Ejemplo n.º 3
0
 public bool Update(UserProfile entity)
 {
     try
     {
         // TODO: validate before update
         _repo.Update(entity);
         _repo.Save();
         return true;
     }
     catch (Exception ex)
     {
         ValidationDic.Clear();
         ValidationDic.Add("Exception", ex.Message);
         return false;
     }
 }