//Get the details of a particular user
 public TblUser GetUserData(int id)
 {
     try
     {
         TblUser user = db.TblUser.Find(id);
         return(user);
     }
     catch
     {
         throw;
     }
 }
 //To Add new user record
 public int AddUser(TblUser user)
 {
     try
     {
         db.TblUser.Add(user);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
 //To Delete the record of a particular user
 public int DeleteUser(int id)
 {
     try
     {
         TblUser emp = db.TblUser.Find(id);
         db.TblUser.Remove(emp);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
        //To Update the records of a particluar user
        public int UpdateUser(TblUser user)
        {
            try
            {
                db.Entry(user).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }