public async Task <ContentTypeVm> SearchAsync(string text, int index, int size, int catagoryId)
        {
            ContentTypeVm contentTypeVm = new ContentTypeVm();

            index = index * size;
            if (string.IsNullOrEmpty(text))
            {
                text = "";
            }
            contentTypeVm.Total = await _dbContext.ContentTypes.Where(x => x.Name.Contains(text) && x.CatagoryId == catagoryId).CountAsync();

            contentTypeVm.ContentTypes = await _dbContext.ContentTypes.Where(x => x.Name.Contains(text) && x.CatagoryId == catagoryId).Skip(index).Take(size).ToListAsync();

            return(contentTypeVm);
        }
 public ScheduleCreatorViewModel()
 {
     _propGridLG         = WinHueSettings.settings.UsePropertyGrid;
     ListTargetHueObject = new ObservableCollection <IHueObject>();
     _header             = new ScheduleCreatorHeader();
     _content            = ContentTypeVm.Light;
     _effect             = "none";
     _dateTimeFormat     = "yyyy-MM-ddTHH:mm:ss";
     _smask = "000";
     if (_propGridLG)
     {
         _selectedViewModel = new ScheduleCreatorPropertyGridViewModel();
     }
     else
     {
         _selectedViewModel = new ScheduleCreatorSlidersViewModel();
     }
 }