コード例 #1
0
 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);
 }
コード例 #2
0
 public Basket CreatedBasket(Basket basket)
 {
     basket.AddedDate    = DateTime.Now;
     basket.ModifiedDate = DateTime.Now;
     _context.Baskets.Add(basket);
     _context.SaveChanges();
     return(basket);
 }