public async Task <IActionResult> Register(BuyerForRegisterDto buyerinfo)
        {
            buyerinfo.FullName = buyerinfo.FullName.ToLower();
            if (await repo.BuyerExists(buyerinfo.FullName) != 0)
            {
                return(BadRequest());
            }
            var createdBuyer = await repo.Register(buyerinfo);

            if (await repo.SaveAll())
            {
                var buyerid = await repo.BuyerExists(createdBuyer.FullName);

                var buyerToreturn = mapper.Map <BuyerToReturn>(createdBuyer);
                buyerToreturn.Id = buyerid;
                return(CreatedAtRoute("GetBuyer", new { id = createdBuyer.Id }, buyerToreturn));
            }
            return(BadRequest());
        }