示例#1
0
 public void GetByIdTest()
 {
     var modelContainer = new TimeTrackerContext();
     var service = new UserService(modelContainer);
     var user = service.GetById(2);
     Assert.IsNotNull(user);
 }
示例#2
0
 public void GetByIdTest()
 {
     var modelContainer = new TimeTrackerContext();
     var service = new BookingService(modelContainer);
     var booking = service.GetById(1);
     Assert.IsNotNull(booking);
 }
示例#3
0
 public void GetByIdTest()
 {
     var modelContainer = new TimeTrackerContext();
     var service = new ProjectService(modelContainer);
     var project = service.GetById(2);
     Assert.IsNotNull(project);
 }
示例#4
0
        public UnitOfWork(TimeTrackerContext context, IProjectRepository projectRepository, IBranchRepository branchRepository,
                          ITeamRepository teamRepository, IHolidayRepository holidayRepository, ITicketTypeRepository ticketTypeRepository)
        {
            _ctx = context;

            Projects    = projectRepository;
            Branches    = branchRepository;
            Teams       = teamRepository;
            Holidays    = holidayRepository;
            TicketTypes = ticketTypeRepository;

            _repositories = new Dictionary <Type, object>();
            _disposed     = false;
        }