DateTime replaced Timestamp, StockController methods
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Migrations\20210318105825_init.cs" />
|
||||
<Compile Remove="Migrations\20210318105825_init.Designer.cs" />
|
||||
<Compile Remove="Migrations\20210318192056_DateTimeUpdate.cs" />
|
||||
<Compile Remove="Migrations\20210318192056_DateTimeUpdate.Designer.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.12" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.12">
|
||||
@@ -18,4 +25,8 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@@ -10,7 +10,7 @@ using Models;
|
||||
namespace Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(LuminousContext))]
|
||||
[Migration("20210318105825_init")]
|
||||
[Migration("20210318193112_init")]
|
||||
partial class init
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -34,11 +34,8 @@ namespace Data.Migrations
|
||||
b.Property<int>("ProductId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<byte[]>("Time")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("rowversion");
|
||||
b.Property<DateTime>("Time")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
@@ -109,11 +106,8 @@ namespace Data.Migrations
|
||||
b.Property<int>("ProductId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<byte[]>("Time")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("rowversion");
|
||||
b.Property<DateTime>("Time")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
@@ -65,7 +65,7 @@ namespace Data.Migrations
|
||||
UserId = table.Column<int>(nullable: false),
|
||||
ProductId = table.Column<int>(nullable: false),
|
||||
Amount = table.Column<double>(nullable: false),
|
||||
Time = table.Column<byte[]>(rowVersion: true, nullable: false)
|
||||
Time = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace Data.Migrations
|
||||
UserId = table.Column<int>(nullable: false),
|
||||
ProductId = table.Column<int>(nullable: false),
|
||||
Amount = table.Column<double>(nullable: false),
|
||||
Time = table.Column<byte[]>(rowVersion: true, nullable: false)
|
||||
Time = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
@@ -32,11 +32,8 @@ namespace Data.Migrations
|
||||
b.Property<int>("ProductId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<byte[]>("Time")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("rowversion");
|
||||
b.Property<DateTime>("Time")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
@@ -107,11 +104,8 @@ namespace Data.Migrations
|
||||
b.Property<int>("ProductId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<byte[]>("Time")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("rowversion");
|
||||
b.Property<DateTime>("Time")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
@@ -33,8 +33,8 @@ namespace Data.Base
|
||||
public virtual Product Products { get; set; }
|
||||
[Required]
|
||||
public double Amount { get; set; }
|
||||
[Timestamp]
|
||||
// [DataType(DataType.DateTime)]
|
||||
[Required]
|
||||
public byte[] Time { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user