コード例 #1
0
 private IEnumerable <Location> GetAllLocations()
 {
     using (var context = _dataContextFactory.Create())
     {
         return(context.Locations
                .ToList());
     }
 }
コード例 #2
0
 private void SetUp()
 {
     _factory = Substitute.For <ILocationContextFactory>();
     _context = Substitute.For <ILocationContext>();
     _factory.Create().Returns(_context);
 }