コード例 #1
0
        public OboeteContext CreateContext()
        {
            if (Connection == null)
            {
                Connection = new SqliteConnection("DataSource=:memory:");
                Connection.Open();

                var options = CreateOptions();
                using (var context = new OboeteContext(options)) {
                    context.Database.EnsureCreated();
                }
            }

            return(new OboeteContext(CreateOptions()));
        }
コード例 #2
0
 protected ActionBase(OboeteContext context)
 {
     DbContext = context;
 }
コード例 #3
0
 protected ActionBase()
 {
     DbContext = new OboeteContext(Config.ConnectionString);
 }
コード例 #4
0
 public JwtAutenticationHandler(IOptionsMonitor <JwtAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, OboeteContext context) : base(options, logger, encoder, clock)
 {
     DbContext = context;
 }
コード例 #5
0
ファイル: UserController.cs プロジェクト: CurtisFulton/Oboete
 public UserController(OboeteContext context) : base(context)
 {
 }
コード例 #6
0
 public OboeteUserAction(OboeteContext context) : base(context)
 {
 }
コード例 #7
0
 public DeckAction(OboeteContext context) : base(context)
 {
 }
コード例 #8
0
 public FlashcardAction(OboeteContext context) : base(context)
 {
 }
コード例 #9
0
 public ControllerBase(OboeteContext dataToken) => DbContext = dataToken;
コード例 #10
0
 public NoteAction(OboeteContext context) : base(context)
 {
 }
コード例 #11
0
 public FlashcardController(OboeteContext context) : base(context)
 {
 }