public GroupModule(IGroupProvider groupProvider) : base("groups") { Get("", async args => await FetchCollection <BrowseGroups, Group> (async x => await groupProvider.BrowseAsync(x)).HandleAsync()); Get("{id}", async args => await Fetch <GetGroup, Group> (async x => await groupProvider.GetAsync(x.Id)).HandleAsync()); }
/// <summary> /// /// </summary> /// <param name="command"></param> /// <returns></returns> protected async override Task <Jaytas.Omilos.Web.Service.Subscription.DomainModel.Group> GetByIdAsync(Command <Group, Guid> command) { return(await _groupProvider.GetAsync(command.ResourceId)); }