public Data.Vehicle Update(Data.Vehicle entity) { var oldEntity = _context.Vehicles.Find(entity.Id); _context.Entry(oldEntity).CurrentValues.SetValues(entity); return(entity); }
public async Task <Data.Vehicle> Create(Data.Vehicle entity) { await _context.AddAsync(entity); return(entity); }