Пример #1
0
        public override async Task <ActionResult> HandleAsync([FromBody] CreateRetailerRequest request, CancellationToken cancellationToken = default)
        {
            var Retailer = new Retailer
            {
                Id          = request.Id,
                Address     = request.Address,
                City        = request.City,
                CompanyName = request.CompanyName,
                Description = request.Description,
                State       = request.State,
                PhoneNumber = request.PhoneNumber
            };
            await _repo.AddAsync(Retailer);

            await _repo.SaveAsync();

            return(Ok(Retailer));
        }