예제 #1
0
        public override async Task <ActionResult> HandleAsync(Guid id, CancellationToken cancellationToken = default)
        {
            await _repo.DeleteInstallerAsync(id);

            await _repo.SaveAsync();

            return(Ok());
        }
예제 #2
0
        public override async Task <ActionResult> HandleAsync([FromBody] CreateInstallerRequest request, CancellationToken cancellationToken = default)
        {
            var Installer = new Installer
            {
                Id              = request.Id,
                RetailerId      = request.RetailerId,
                Area            = request.Area,
                FirstName       = request.FirstName,
                LastName        = request.LastName,
                PhoneNumber     = request.PhoneNumber,
                SquareYardPrice = request.SquareYardPrice
            };
            await _repo.AddAsync(Installer);

            await _repo.SaveAsync();

            return(Ok(Installer));
        }