public void Add(Application app) { using (var context = new ConfigContext()) { context.Applications.Add(app); context.SaveChanges(); } }
public void Delete(Application application) { using (var context = new ConfigContext()) { var appFromDb = context.Applications.Find(application.ApplicationID); context.Applications.Remove(appFromDb); context.SaveChanges(); } }