Commit 8791ccbe authored by Almouhannad's avatar Almouhannad

(B) Add first migration

parent a6111736
...@@ -7,11 +7,11 @@ public partial class ClinicsDbContext : DbContext ...@@ -7,11 +7,11 @@ public partial class ClinicsDbContext : DbContext
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{ {
// TODO: Use options pattern // TODO: Use options pattern
optionsBuilder.UseSqlServer("server=.\\;database=Clinics_Test;Trusted_Connection=True; Encrypt=False;MultipleActiveResultSets=true"); optionsBuilder.UseSqlServer("server=.\\;database=Clinics;Trusted_Connection=True; Encrypt=False;MultipleActiveResultSets=true");
} }
protected override void OnModelCreating(ModelBuilder modelBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder)
{ {
modelBuilder.ApplyConfigurationsFromAssembly(typeof(ClinicsDbContext).Assembly); //modelBuilder.ApplyConfigurationsFromAssembly(typeof(ClinicsDbContext).Assembly);
} }
} }
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Persistence.Context;
#nullable disable
namespace Persistence.Migrations
{
[DbContext(typeof(ClinicsDbContext))]
[Migration("20240815195550_Initial_Migration")]
partial class Initial_Migration
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
#pragma warning restore 612, 618
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Persistence.Migrations
{
/// <inheritdoc />
public partial class Initial_Migration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Persistence.Context;
#nullable disable
namespace Persistence.Migrations
{
[DbContext(typeof(ClinicsDbContext))]
partial class ClinicsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
#pragma warning restore 612, 618
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment