public static List <Keyboard> GetKeyboards() { using (var model = new HardwareModel()) { var keyboards = model.Keyboards.Include(k => k.Brand); return(keyboards.ToList()); } }
//// Collection of Keyboards //public static List<Keyboard> Keyboards { get; set; } #endregion #region Methods public static void AddKeyboard(Keyboard Keyboard) { using (var model = new HardwareModel()) { model.Keyboards.Add(Keyboard); model.SaveChanges(); } }