12345678910111213141516171819 |
- using Microsoft.EntityFrameworkCore;
- using Repository.Entiies;
- using System;
- namespace Repository
- {
- public class LogDbContext: DbContext
- {
- protected override void OnConfiguring(DbContextOptionsBuilder options)
- {
- options.EnableSensitiveDataLogging();
- var connetionString = $"Data Source={AppDomain.CurrentDomain.BaseDirectory}logs.db";
- options.UseSqlite(connetionString).UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
- base.OnConfiguring(options);
- }
- public DbSet<Log> Logs { get; set; }
- }
- }
|