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(); } }
public UnitOfWork(LoggedInUserContext loggedInUserContext) { _loggedInUserContext = loggedInUserContext; }