Example #1
0
        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)));
        }
Example #2
0
        public override Task <BooleanObject> UpdateItemUnit(ItemUnitDTO request, ServerCallContext context)
        {
            var success = _itemUnitDao.Update(_mapper.Map <ItemUnit>(request));

            return(Task.FromResult(new BooleanObject()
            {
                Body = success
            }));
        }
Example #3
0
 public Response <bool> Put(ItemUnitDTO model) => _client.UpdateItemUnit(model).Body;
Example #4
0
 public Response <ItemUnitDTO> Post(ItemUnitDTO model) => _client.CreateItemUnit(model);