Exemple #1
0
 public Guid GetUser(Guid UserID)
 {
     try
     {
         TblUser user = db.TblUser.Find(UserID);
         return(UserID);
     }
     catch
     {
         throw;
     }
 }
Exemple #2
0
 public int UpdateUser(TblUser user)
 {
     try
     {
         db.Entry(user).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemple #3
0
 public int AddUser(TblUser user)
 {
     try
     {
         db.TblUser.Add(user);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemple #4
0
 public Guid DeleteUser(Guid UserID)
 {
     try
     {
         TblUser user = db.TblUser.Find(UserID);
         db.TblUser.Remove(user);
         db.SaveChanges();
         return(UserID);
     }
     catch
     {
         throw;
     }
 }