Exemplo n.º 1
0
        public User Create(User user)
        {
            User addedUser = _ctx.Users.Add(user).Entity;

            _ctx.SaveChanges();
            return(addedUser);
        }
Exemplo n.º 2
0
 public Vehicle Create(Vehicle vehicle)
 {
     _ctx.Attach(vehicle).State = EntityState.Added;
     _ctx.SaveChanges();
     return(vehicle);
 }
Exemplo n.º 3
0
 public Order Create(Order order)
 {
     _ctx.Attach(order).State = EntityState.Added;
     _ctx.SaveChanges();
     return(order);
 }