Commit d1611da9 by zxw

修复BaseCharge缺失外键

parent d1103367
...@@ -8,11 +8,10 @@ using Microsoft.EntityFrameworkCore; ...@@ -8,11 +8,10 @@ using Microsoft.EntityFrameworkCore;
namespace JmpModel.Model namespace JmpModel.Model
{ {
[Keyless]
[Table("base_charge")] [Table("base_charge")]
public partial class BaseCharge public partial class BaseCharge
{ {
[Required] [Key]
[Column("id")] [Column("id")]
[StringLength(64)] [StringLength(64)]
public string Id { get; set; } public string Id { get; set; }
......
...@@ -146,7 +146,7 @@ namespace JmpModel.Model.DataContext ...@@ -146,7 +146,7 @@ namespace JmpModel.Model.DataContext
if (!optionsBuilder.IsConfigured) if (!optionsBuilder.IsConfigured)
{ {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
optionsBuilder.UseMySql("data source=192.168.2.105;port=13306;initial catalog=junmppolicesqlb;user id=root;password=Junmp123;charset=utf8;treattinyasboolean=false", Microsoft.EntityFrameworkCore.ServerVersion.Parse("5.7.38-mysql")); optionsBuilder.UseMySql("data source=192.168.3.188;port=13306;initial catalog=test;user id=root;password=Junmp123;charset=utf8;treattinyasboolean=false", Microsoft.EntityFrameworkCore.ServerVersion.Parse("5.7.38-mysql"));
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论