예제 #1
0
 public static void CreateMovie()
 {
     var uc = new LoggedInUserContext { UserId = new Guid(), UserName = "******" };
     var uow = new AliceApi.Repository.UnitOfWork(uc);
     using (uow)
     {
         var movie = new AliceApi.Repository.Models.Movie {
             MovieTitle = "Star Wars"
         };
         uow.MovieRepository.Insert(movie);
         uow.Save();
         var foo = uow.MovieRepository.Get();
     }
 }
예제 #2
0
 public UnitOfWork(LoggedInUserContext loggedInUserContext)
 {
     _loggedInUserContext = loggedInUserContext;
 }