public void Setup() { _fakeGpnContext = new GpnContext(new DbContextOptionsBuilder <GpnContext>().UseSqlServer(@"Data Source=MICROBE\SMPPDB1F2017;Initial Catalog=GPN;Persist Security Info=True;Password=sms_mcc@0802121;User ID=SmsMessageCenter").Options); _fakeIndicatorsController = new IndicatorsController(_fakeGpnContext); _fakeIndicator = new Indicator() { Id = Guid.NewGuid(), Title = "New title", MinValue = 0, MaxValue = 5000, Value = 1000 }; }
public RolesController(GpnContext context) { _context = context; }
public UsersController(GpnContext context, IOptions <WebOptions> webOptions) { _context = context; this.webOptions = webOptions; }
// private Guid UserId => Guid.Parse(User.Claims.Single(c => c.Type == ClaimTypes.NameIdentifier).Value); public IndicatorsController(GpnContext context) { _context = context; }