public List<Category> GetCategoryById(int categoryId) { using (var entities = new ContentDBEntities()) { var categories = entities.Categories.Where(w => w.PKCategoryId == categoryId); return categories.ToList(); } }
public List<Writer> GetAll() { using (var entites = new ContentDBEntities()) { var writer = entites.Writer.Where(p => p.IsActive).ToList(); return writer; } }
public List<Category> GetAll() { using (var entites = new ContentDBEntities()) { var categories = entites.Categories.Where(p => p.IsActive).ToList(); return categories; } }