public UnitOfWork(ProjektContext db) { if (db == null) { throw new ArgumentException("DbContext"); } DbContext = db; }
public void SetUp() { _sut = new ProjektContext(); var Post1 = new Post { Id = 1, Title = "PostTest", Content = "Post for testing" }; _sut.Posts.Add(Post1); }
public PersonenRepositroy() { ctx = new ProjektContext(new DbContextOptionsBuilder <ProjektContext>() .UseSqlServer(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=ProjektBoard;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False") .EnableSensitiveDataLogging(true) .EnableDetailedErrors(true) .LogTo(l => Console.Write(l), Microsoft.Extensions.Logging.LogLevel.Information) .Options ); ctx.Database.OpenConnection(); }
public DiningExperiencesApiController(ProjektContext context) { _context = context; }
public MoviesController(ProjektContext context) { _context = context; }
public UsersController(ProjektContext context) { _context = context; }
public ActorsController(ProjektContext context) { _context = context; }
public ComapaniesController(ProjektContext context) { _context = context; }
public EngagementsController(ProjektContext context) { _context = context; }
public BoughtsController(ProjektContext context) { _context = context; }
public UserService(ProjektContext context) { Context = context; }
public DiningExperiencesController(ProjektContext context, IFlickrService flickrService, IGmapsService gmailService) { _context = context; _flickerService = flickrService; _gmailService = gmailService; }