public async Task <IActionResult> RemoveSellerFromShop([FromBody] AddSellerToShopDto removeSellerFromShopDto) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var itemModel = dtoMapper.Map <AddSellerToShopDto, ShopSeller>(removeSellerFromShopDto); await shopService.RemoveSellerFromShop(itemModel); return(Ok("Seller has removed from shop")); }
public async Task <IActionResult> AddSellerToShop([FromBody] AddSellerToShopDto addsellerToShopDto) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var itemModel = dtoMapper.Map <AddSellerToShopDto, ShopSeller>(addsellerToShopDto); await shopService.AddSellerToShop(itemModel); return(Ok("Seller has added to shop")); }