Beispiel #1
0
 public async Task <IEnumerable <CorporateEntity> > Handle(GetCorporateEntityQuery message)
 {
     return(await Task.Factory.StartNew(() =>
     {
         return CorporateEntityDataStore.get((x) => x.Id == message.Id);
     }));
 }
Beispiel #2
0
 public async Task <IEnumerable <CorporateEntity> > Handle(GetCorporateEntitiesQuery message)
 {
     return(await Task.Factory.StartNew(() =>
     {
         return CorporateEntityDataStore.get(message.startIndex, message.length);
     }));
 }
Beispiel #3
0
 public async Task <bool> Handle(ModifyCorporateEntityCommand message)
 {
     return(await Task.Factory.StartNew(() =>
     {
         CorporateEntityDataStore.Modify(new CorporateEntity()
         {
             Id = message.Id,
             InternalReference = message.InternalReference,
             Name = message.Name
         });
         return true;
     }));
 }