Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task Change(string userId, WareHouse wareHouse)
- {
- var wh = _context.WareHouses.Where(user => user.UserId == userId).First(wh => wh.Id == wareHouse.Id);
- if (wh != null)
- {
- wareHouse.OnChange(userId);
- wh = wareHouse;
- await _context.SaveChangesAsync();
- }
- else
- {
- throw new EntityException("Warehouse not found");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement