更改null操作
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Yi.Framework.Model.Base
|
||||
{
|
||||
public class Entity<Key> : IEntity<Key>
|
||||
{
|
||||
public Key Id { get; set; }
|
||||
public Key Id { get; set; }=default(Key)!;
|
||||
|
||||
public object[] GetKeys()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Model.Base
|
||||
//
|
||||
// 摘要:
|
||||
// Id of the entity.
|
||||
public TKey Id { get; set; }
|
||||
public TKey? Id { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
@@ -13,6 +13,6 @@ namespace Yi.Framework.Model.Base
|
||||
|
||||
public interface IEntityDto<TKey> : IEntityDto
|
||||
{
|
||||
TKey Id { get; set; }
|
||||
TKey? Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace Yi.Framework.Model.Base.Query
|
||||
{
|
||||
public class QueryParameter
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string? Key { get; set; }
|
||||
public string? Value { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ConditionalType Type { get; set; } = ConditionalType.Like;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user