Пример #1
0
        public void ShouldRequireValidZoneId()
        {
            var command = new DeleteZoneCommand {
                Id = 99
            };

            FluentActions.Invoking(() => SendAsync(command)).Should().Throw <NotFoundException>();
        }
Пример #2
0
 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);
     }));
 }