public TestingDatabase() { _connection = new SqliteConnection("Filename=:memory:"); _connection.Open(); _db = new SMModelersContext( new DbContextOptionsBuilder <SMModelersContext>() .UseSqlite(_connection) .Options); _db.Database.EnsureCreated(); _comment = new PostCommentManager(_db); _image = new PostImageManager(_db, _cloudImage, _s3Provider); _post = new UserPostManager(_db, _comment, _image); }
public UserPostManager(SMModelersContext context, IPostComment postComment, IPostImage postImage) { _context = context; _postComment = postComment; _postImage = postImage; }
public PostImageController(IPostImage postImage, UserManager <ApplicationUser> userManager) { _postImage = postImage; _userManager = userManager; }