private void CleanUpTestRecord(int hwId) { var removeData = _db.DataInputs .Where(rr => rr.id == hwId) .SingleOrDefault(); if (removeData != null) { _db.DataInputs.Remove(removeData); _db.SaveChanges(); } }
private DataInputs SetupTestRecord() { _db = new HelloWorldModel(); var newData = new DataInputs { id = 1, DataInputText = "Hello World" }; _db.DataInputs.Add(newData); _db.SaveChanges(); return(newData); }