| 12345678910111213141516171819202122 |
- using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore;
- namespace BO.AppServer.Web.Data
- {
- public class IFDbContext : IdentityDbContext
- {
- public IFDbContext(DbContextOptions options)
- : base(options)
- {
- }
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- if (!optionsBuilder.IsConfigured)
- {
- #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
- optionsBuilder.UseSqlServer("Server=(local);Database=BO_IF;Trusted_Connection=True;");
- }
- }
- }
- }
|