예제 #1
0
        private void CleanUpTestRecord(int hwId)
        {
            var removeData = _db.DataInputs
                             .Where(rr => rr.id == hwId)
                             .SingleOrDefault();

            if (removeData != null)
            {
                _db.DataInputs.Remove(removeData);
                _db.SaveChanges();
            }
        }
예제 #2
0
        private DataInputs SetupTestRecord()
        {
            _db = new HelloWorldModel();

            var newData = new DataInputs
            {
                id            = 1,
                DataInputText = "Hello World"
            };

            _db.DataInputs.Add(newData);
            _db.SaveChanges();

            return(newData);
        }