public async Task <SimpleResult> AddWarehouse(WarehousePoco input) { await _context.Warehouses.AddAsync(input); await _context.SaveChangesAsync(); return(new SimpleResult { IsSuccess = true }); }
public async Task <SimpleResult> AddWarehouse(AddWarehouseInput input) { try { var poco = new WarehousePoco { Name = input.Name, UserId = input.UserId }; return(await _warehouse.AddWarehouse(poco)); } catch { return(new SimpleResult { IsSuccess = false }); } }