public async Task <ActionResponse> Post(string name) { Mdls.Category category = new Mdls.Category { Name = name }; string categoryId = await categoryRepository.Add(category); return(new ActionResponse { State = !String.IsNullOrEmpty(categoryId) }); }
public async Task <List <Mdls.Category> > GetForProfileDisplay() { string[] Ids = new string[] { "59d2b33994d8e8dfd4460ff9", "59d2b3af94d8e8dfd4460ffb" }; List <Mdls.Category> tabs = new List <Mdls.Category>(); foreach (string categoryId in Ids) { Mdls.Category item = await categoryRepository.Get(categoryId); tabs.Add(item); } return(tabs); }