public override Task <ItemUnitDTO> CreateItemUnit(ItemUnitDTO request, ServerCallContext context) { var id = _itemUnitDao.Insert(_mapper.Map <ItemUnit>(request)); var itemUnit = _itemUnitDao.Get(id); return(Task.FromResult(_mapper.Map <ItemUnitDTO>(itemUnit))); }
public override Task <BooleanObject> UpdateItemUnit(ItemUnitDTO request, ServerCallContext context) { var success = _itemUnitDao.Update(_mapper.Map <ItemUnit>(request)); return(Task.FromResult(new BooleanObject() { Body = success })); }
public Response <bool> Put(ItemUnitDTO model) => _client.UpdateItemUnit(model).Body;
public Response <ItemUnitDTO> Post(ItemUnitDTO model) => _client.CreateItemUnit(model);