/// <inheritdoc /> public async Task <DomainCommandResponse> Handle(UpdateEventDomainCommand request, CancellationToken cancellationToken) { try { this.UnitOfWork.EventRepository.Update(request.ProjectedAs <Event>()); // 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 ReturnCorrectAdmUpdateEventCommand() { var com = new UpdateEventDomainCommand(true); Assert.AreEqual(com.Command, UpdateSpCommandPattern.AdminUpdate.UpdateEventAdm); }
public void ReturnCorrectUpdateEventCommand() { var com = new UpdateEventDomainCommand(); Assert.AreEqual(com.Command, UpdateSpCommandPattern.UpdateEvent); }