public void ShouldRequireValidZoneId() { var command = new DeleteZoneCommand { Id = 99 }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <NotFoundException>(); }
public ResultDto DeleteZone(long siteId, long id) { return(Result(() => { // TODO: check siteid, and id matche (zone belongs to site) var command = new DeleteZoneCommand { ZoneId = id, }; CommandDispatcher.Send(command); })); }