/// <inheritdoc /> public async Task <DomainCommandResponse> Handle(UpdateEventAreaDomainCommand request, CancellationToken cancellationToken) { try { this.UnitOfWork.EventAreaRepository.Update(request.ProjectedAs <EventArea>()); // this.Logger.Info($"Change in db table {typeof(Area).Name} : {returnValue} entities"); var retResp = new DomainCommandResponse { IsSuccess = true, Message = "Entity was Updated", Object = request }; return(await Task.FromResult(retResp)); } catch (Exception ex) { var ret = new DomainCommandResponse { Message = ex.Message }; return(await Task.FromResult(ret)); } }
public void ReturnCorrectUpdateEventAreaCommand() { var com = new UpdateEventAreaDomainCommand(); Assert.AreEqual(com.Command, UpdateSpCommandPattern.UpdateEventArea); }
public void ReturnCorrectAdmUpdateEventAreaCommand() { var com = new UpdateEventAreaDomainCommand(true); Assert.AreEqual(com.Command, UpdateSpCommandPattern.AdminUpdate.UpdateEventAreaAdm); }