public bool CreateIfNotExists(out Exception ex) { try { Task <bool> t = Task <bool> .Factory.StartNew(() => { using (var db = new Data.AutomobileDbContext()) { db.Database.CreateIfNotExists(); } return(true); }); ex = null; return(t.Result); } catch (Exception e) { ex = e; return(false); } }
public AutomobileController(Data.AutomobileDbContext context) : base(context) { }
protected Controller(Data.AutomobileDbContext context) { this.context = context; }