public override async Task <ActionResult> HandleAsync(Guid id, CancellationToken cancellationToken = default) { await _repo.DeleteClosetAsync(id); await _repo.SaveAsync(); return(Ok()); }
public override async Task <ActionResult> HandleAsync([FromBody] CreateClosetRequest request, CancellationToken cancellationToken = default) { var Closet = new Closet { Id = request.Id, RoomId = request.RoomId, BuildingId = request.BuildingId, CarpetId = request.CarpetId, CarpetPrice = request.CarpetPrice, Length = request.Length, Width = request.Width }; await _repo.AddAsync(Closet); await _repo.SaveAsync(); return(Ok(Closet)); }