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));
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public WebUserDeleted(string aggregateId, DeleteWebUser previous)
     : base(typeof(WebUser).Name, aggregateId, 0, previous)
 {
     Id = aggregateId;
 }