public void AddRangeJSONToDatabase(List <Result> results) { using (SomeDotesDbContext db = new SomeDotesDbContext()) { db .Results .AddRange(results); db.SaveChanges(); } }
public void AddJSONToDatabase(Result result) { using (SomeDotesDbContext db = new SomeDotesDbContext()) { db .Results .Add(result); db.SaveChanges(); } }