示例#1
0
 public async Task <IEnumerable <CorporateEntity> > Handle(GetCorporateEntityQuery message)
 {
     return(await Task.Factory.StartNew(() =>
     {
         return CorporateEntityDataStore.get((x) => x.Id == message.Id);
     }));
 }
示例#2
0
 public async Task <IEnumerable <CorporateEntity> > Handle(GetCorporateEntitiesQuery message)
 {
     return(await Task.Factory.StartNew(() =>
     {
         return CorporateEntityDataStore.get(message.startIndex, message.length);
     }));
 }
示例#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;
     }));
 }