public void AddFooBarObjectTest() { ExampleService svc = new ExampleService(context); int actual = svc.AddFooBarObject(); int expected = 1; Assert.AreEqual(actual, expected); }
static void Main(string[] args) { Console.WriteLine("Press any key to insert an active Foo-Bar in database."); Console.ReadKey(); using (ExampleMappingEntities db = new ExampleMappingEntities()) { ExampleService svc = new ExampleService(db); int id = svc.AddFooBarObject(); Console.WriteLine("An Foo-Bar object was added with ID " + id + "."); Console.ReadKey(); } }