Example #1
0
 public async Task CreateCategory(string name, Guid userid)
 {
     using (var CategoryService = new BlogCagetoryService())
     {
         await CategoryService.CreateAsync(new BlogCagetory()
         {
             UserId   = userid,
             Cagetory = name
         });
     }
 }
Example #2
0
 public async Task <List <BlogCagetoryDto> > GetAllCagetory(Guid userId)
 {
     using (IBlogCagetory cagetoryService = new BlogCagetoryService())
     {
         return(await cagetoryService.GetAll().Select(m => new BlogCagetoryDto()
         {
             Id = m.Id,
             CagetoryName = m.Cagetory
         }).ToListAsync());
     }
 }