public async Task <IActionResult> CreateBuyer(BuyerToCreateDto buyertocreateDto) { if (await _repo.BuyerFullnameExists(buyertocreateDto.FullName)) { return(BadRequest("Buyer's full name already exist, choose another one")); } var buyerToCreate = new Buyer(); var createdBuyer = await _repo.CreateBuyer(buyerToCreate, buyertocreateDto.FullName, buyertocreateDto.Credit); return(StatusCode(201)); }