protected override IEnumerable <UserVm> Handle(GetValuesQuery request) { List <UserVm> listofUser = new List <UserVm>(); var a = _db.GetAllValues(); foreach (var item in a) { listofUser.Add(new UserVm() { Id = item.Id, Name = item.Name }); } return(listofUser); }
public Task <IEnumerable <string> > Handle(GetValuesQuery request, CancellationToken cancellationToken) { return(Task.FromResult((new string[] { "Bryan", "McCoy" }).AsEnumerable())); }
public Task <IEnumerable <string> > Handle(GetValuesQuery request, CancellationToken cancellationToken) { IEnumerable <string> values = new string[] { "value1", "value2" }; return(Task.FromResult(values)); }