public static AffiliateDTO CreateAffiliateVMToDTO(CreateAffiliateViewModel createAffiliateViewModel) { return(new AffiliateDTO { Name = createAffiliateViewModel.Name }); }
public IActionResult CreateAffiliate([FromBody] CreateAffiliateViewModel createAffiliateViewModel) { var affiliateDTO = AffiliateMapper.CreateAffiliateVMToDTO(createAffiliateViewModel); _affiiliateService.Create(affiliateDTO); return(Ok(ModelState)); }