public void Setup() { users = new List <User>(); users.Add(new User { UserId = 1, FirstName = "Venkatesh" }); var myDbMoq = new Mock <ISampleDbContext>(); myDbMoq.Setup(p => p.Users).Returns(SampleDbContextMock.GetQueryableMockDbSet(users)); dbContext = myDbMoq.Object; }
public LlpaService(ISampleDbContext ctx) { _ctx = ctx; }
public PricerService(ISampleDbContext ctx) { _ctx = ctx; }
public AuthorsController(IRepository <Author> repository, ISampleDbContext dbContext) : base(repository) { this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }
public SampleMessageHandler(ISampleDbContext dbContext) { this.dbContext = dbContext; }
public UserService(ISampleDbContext dbContext) { this._dbContext = dbContext; }
public NewAddUserCommandHandler(ISampleDbContext context) { _context = context; }
public SampleDataAccess(ISampleDbContext db) { _db = db; }
protected CommandBase(ISampleDbContext context) { Context = context; }
public AddUserToDepartmentsCommand(ISampleDbContext context) : base(context) { }
public AddUserCommand(ISampleDbContext context) : base(context) { }
public GetUsersInDepartmentQuery(ISampleDbContext context) : base(context) { }
public CommandExecutor(ISampleDbContext context, ICommandDispatcher dispatcher) { _context = context; _dispatcher = dispatcher; }
protected QueryBase(ISampleDbContext context) { Context = context; }
public AddDepartmentCommand(ISampleDbContext context) : base(context) { }
public BooksRepository(ISampleDbContext context) : base(context) { this.context = context ?? throw new ArgumentNullException(nameof(context)); }
public NewAddUserToDepartmentsCommandHandler(ISampleDbContext context) { _context = context; }