Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
HIAST-Clinics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
HIAST-Clinics
Commits
8791ccbe
Commit
8791ccbe
authored
Aug 15, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(B) Add first migration
parent
a6111736
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
2 deletions
+79
-2
ClinicsDbContext.cs
Clinics.Backend/Persistence/Context/ClinicsDbContext.cs
+2
-2
20240815195550_Initial_Migration.Designer.cs
...e/Migrations/20240815195550_Initial_Migration.Designer.cs
+29
-0
20240815195550_Initial_Migration.cs
...ersistence/Migrations/20240815195550_Initial_Migration.cs
+22
-0
ClinicsDbContextModelSnapshot.cs
...d/Persistence/Migrations/ClinicsDbContextModelSnapshot.cs
+26
-0
No files found.
Clinics.Backend/Persistence/Context/ClinicsDbContext.cs
View file @
8791ccbe
...
@@ -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);
}
}
}
}
Clinics.Backend/Persistence/Migrations/20240815195550_Initial_Migration.Designer.cs
0 → 100644
View file @
8791ccbe
// <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
}
}
}
Clinics.Backend/Persistence/Migrations/20240815195550_Initial_Migration.cs
0 → 100644
View file @
8791ccbe
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
)
{
}
}
}
Clinics.Backend/Persistence/Migrations/ClinicsDbContextModelSnapshot.cs
0 → 100644
View file @
8791ccbe
// <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
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment