public async Task DeleteWebUser(DeleteWebUser command) { if (command.AggregateId != Id) { throw new InvalidOperationException("The command was not sended to this aggregate root."); } //Console.WriteLine("Eliminando evento WebUserDeleted"); await RaiseEventAsync(new WebUserDeleted(Id, command)); }
public Command RunSearcher(Dictionary <string, object> row, WebCommandsController controller) { DeleteWebUser commands = null; //lo sullo seria comprovar que en la otra base de datos no se ha eliminado, si se ha eliminado se quitaria el flag de changevalue a -1 Console.WriteLine("Preparando el command DeleteWebUser"); commands = new DeleteWebUser(row.GetValueOrDefault("userid").ToString()); return(commands); }
public WebUserDeleted(string aggregateId, DeleteWebUser previous) : base(typeof(WebUser).Name, aggregateId, 0, previous) { Id = aggregateId; }