1.更新模型
This commit is contained in:
parent
eee9129bae
commit
c2e21cdcae
@ -58,10 +58,15 @@ namespace Syc.Basic.Web.WMS.Service
|
||||
[HttpPost]
|
||||
public async Task InsertProduce(ProduceDto input)
|
||||
{
|
||||
foreach (var item in await produceRepository.GetListAsync())
|
||||
var produces = await produceRepository.GetListAsync();
|
||||
if (produces.Count > 0)
|
||||
{
|
||||
foreach (var item in produces)
|
||||
{
|
||||
item.IfUse = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var produce = new Produce()
|
||||
{
|
||||
|
@ -174,6 +174,12 @@ namespace Syc.Basic.Web.EntityFrameworkCore
|
||||
b.ConfigureByConvention();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Produce>(b =>
|
||||
{
|
||||
b.ToTable(nameof(Produce));
|
||||
b.ConfigureByConvention();
|
||||
});
|
||||
|
||||
return modelBuilder;
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,12 @@ public class WMSDbContext :
|
||||
/// 料箱
|
||||
/// </summary>
|
||||
public virtual DbSet<Box> Boxs { get; set; }
|
||||
/// <summary>
|
||||
/// 丝锭
|
||||
/// </summary>
|
||||
public virtual DbSet<Silk> Silk { get; set; }
|
||||
//生产
|
||||
public virtual DbSet<Produce> Produce { get; set; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
Loading…
x
Reference in New Issue
Block a user