Exemple #1
0
 private void GetAllCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is IEnumerable <IdRole> )
     {
         cmd.Request.Requestor.Tell(cmd.Result);
     }
     else
     {
         Unhandled(cmd);
     }
 }
Exemple #2
0
 private void GetByNormalizedNameCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is IEnumerable <IdRole> )
     {
         var results = (IEnumerable <IdRole>)cmd.Result;
         if (results != null)
         {
             cmd.Request.Requestor.Tell(results.FirstOrDefault());
         }
     }
     else
     {
         Unhandled(cmd);
     }
 }
Exemple #3
0
 private void CreateCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is EntityTypeActor.Create_Success)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.CreateResult());
     }
     else if (cmd.Result is EntityTypeActor.Create_IdExists)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.CreateIdExists());
     }
     else
     {
         Unhandled(cmd);
     }
 }
Exemple #4
0
 private void DeleteByIdCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is EntityTypeActor.DeleteById_Success)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.DeleteByIdResult());
     }
     else if (cmd.Result is EntityTypeActor.DeleteById_IdAlreadyDeleted)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.DeleteByIdNotFound());
     }
     else if (cmd.Result is EntityTypeActor.DeleteById_IdNotFound)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.DeleteByIdNotFound());
     }
     else
     {
         Unhandled(cmd);
     }
 }
Exemple #5
0
 private void GetByIdCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is IdRole)
     {
         cmd.Request.Requestor.Tell(cmd.Result);
     }
     else if (cmd.Result is EntityTypeActor.GetById_IdDeleted)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.GetByIdNoMatch());
     }
     else if (cmd.Result is EntityTypeActor.GetById_IdNotFound)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.GetByIdNoMatch());
     }
     else
     {
         Unhandled(cmd);
     }
 }
Exemple #6
0
 private void UpdateCompletedCmd(RequestActor.RequestCompleted cmd)
 {
     if (cmd.Result is EntityTypeActor.Update_Success)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.UpdateResult());
     }
     else if (cmd.Result is EntityTypeActor.Update_IdDeleted)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.UpdateNotFound());
     }
     else if (cmd.Result is EntityTypeActor.Update_IdNotFound)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.UpdateNotFound());
     }
     else if (cmd.Result is EntityTypeActor.Update_InvalidType)
     {
         cmd.Request.Requestor.Tell(new RoleCommands.UpdateNotFound());
     }
     else
     {
         Unhandled(cmd);
     }
 }