public override async Task <ActionResult> HandleAsync(Guid id, CancellationToken cancellationToken = default) { await _repo.DeleteInstallerAsync(id); await _repo.SaveAsync(); return(Ok()); }
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)); }