示例#1
0
        public async Task <ActionResult> Post(BuysDto model)
        {
            var buysDto = mapper.Map <Buys>(model);
            await BuysService.InsertBuys(buysDto);

            return(Ok(model));
        }
示例#2
0
        public async Task <ActionResult> Put(int id, BuysDto model)
        {
            var Buys = mapper.Map <Buys>(model);

            model.id = id;
            var result = await BuysService.UpdateBuys(Buys);

            return(Ok(result));
        }