public User Register(User user) { user.Password = CryptoHelper.Crypto.HashPassword(user.Password); user.AddedDate = DateTime.Now; user.ModifiedDate = DateTime.Now; user.AddedBy = "System"; user.ModifiedBy = "System"; _context.Users.Add(user); _context.SaveChanges(); return(user); }
public Basket CreatedBasket(Basket basket) { basket.AddedDate = DateTime.Now; basket.ModifiedDate = DateTime.Now; _context.Baskets.Add(basket); _context.SaveChanges(); return(basket); }