Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Dec 20, 2024
1 parent 8be9199 commit 9640a50
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Boilerplate.Client.Core.Data
public partial class OfflineDbContextModel
{
private OfflineDbContextModel()
: base(skipDetectChanges: false, modelId: new Guid("b97b95bd-89b9-4be0-a574-d2035391c0c8"), entityTypeCount: 1)
: base(skipDetectChanges: false, modelId: new Guid("4b5524a2-4b87-4b64-9e87-fe2649512808"), entityTypeCount: 1)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas
"Boilerplate.Shared.Dtos.Identity.UserDto",
typeof(UserDto),
baseEntityType,
propertyCount: 9,
propertyCount: 10,
keyCount: 1);

var id = runtimeEntityType.AddProperty(
Expand All @@ -41,6 +41,13 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas
nullable: true,
valueConverter: new DateTimeOffsetToBinaryConverter());

var concurrencyStamp = runtimeEntityType.AddProperty(
"ConcurrencyStamp",
typeof(string),
propertyInfo: typeof(UserDto).GetProperty("ConcurrencyStamp", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
fieldInfo: typeof(UserDto).GetField("<ConcurrencyStamp>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
nullable: true);

var email = runtimeEntityType.AddProperty(
"Email",
typeof(string),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
FullName = table.Column<string>(type: "TEXT", nullable: false),
Gender = table.Column<int>(type: "INTEGER", nullable: true),
BirthDate = table.Column<long>(type: "INTEGER", nullable: true),
ProfileImageName = table.Column<string>(type: "TEXT", nullable: true)
ProfileImageName = table.Column<string>(type: "TEXT", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
Expand All @@ -32,8 +33,8 @@ protected override void Up(MigrationBuilder migrationBuilder)

migrationBuilder.InsertData(
table: "Users",
columns: new[] { "Id", "BirthDate", "Email", "FullName", "Gender", "Password", "PhoneNumber", "ProfileImageName", "UserName" },
values: new object[] { new Guid("8ff71671-a1d6-4f97-abb9-d87d7b47d6e7"), 1306790461440000000L, "[email protected]", "Boilerplate test account", 0, "123456", "+31684207362", null, "test" });
columns: new[] { "Id", "BirthDate", "ConcurrencyStamp", "Email", "FullName", "Gender", "Password", "PhoneNumber", "ProfileImageName", "UserName" },
values: new object[] { new Guid("8ff71671-a1d6-4f97-abb9-d87d7b47d6e7"), 1306790461440000000L, null, "[email protected]", "Boilerplate test account", 0, "123456", "+31684207362", null, "test" });
}

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// <auto-generated />
using System;
using Boilerplate.Client.Core.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

Expand All @@ -23,6 +26,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<long?>("BirthDate")
.HasColumnType("INTEGER");

b.Property<string>("ConcurrencyStamp")
.HasColumnType("TEXT");

b.Property<string>("Email")
.HasColumnType("TEXT");

Expand Down

0 comments on commit 9640a50

Please sign in to comment.