转移.net core 3.1,为.NET 5做准备

This commit is contained in:
ÂëÉñ
2020-10-22 14:59:36 +08:00
parent fd9bca23a7
commit a35d596237
1080 changed files with 175912 additions and 185681 deletions

View File

@@ -1,12 +1,29 @@
using System;
using System.ComponentModel;
namespace OpenAuth.Repository.Domain
namespace OpenAuth.Repository.Core
{
public abstract class Entity
/// <summary>
/// 主键为字符串的实体基类,为系统默认的实体类型
/// </summary>
public class Entity : BaseEntity
{
[Browsable(false)]
public string Id { get; set; }
/// <summary>
/// 判断主键是否为空,常用做判定操作是【添加】还是【编辑】
/// </summary>
/// <returns></returns>
public override bool KeyIsNull()
{
return string.IsNullOrEmpty(Id);
}
public Entity()
/// <summary>
/// 创建默认的主键值
/// </summary>
public override void GenerateDefaultKeyVal()
{
Id = Guid.NewGuid().ToString();
}