First Initial
This commit is contained in:
49
EF/_BaseEntity.cs
Normal file
49
EF/_BaseEntity.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TTSW.EF
|
||||
{
|
||||
public class BaseEntity<T>: IBaseEntity<T>
|
||||
{
|
||||
public BaseEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public T id { get; set; }
|
||||
|
||||
//public string CreatorId { get; set; }
|
||||
//[ForeignKey("CreatorId")]
|
||||
//public virtual User Creator { get; set; }
|
||||
|
||||
//public string UpdatorId { get; set; }
|
||||
//[ForeignKey("UpdatorId")]
|
||||
//public virtual User Updator { get; set; }
|
||||
|
||||
public DateTime created { get; set; }
|
||||
public DateTime updated { get; set; }
|
||||
public bool isActive { get; set; }
|
||||
|
||||
//public string CreatorFullname
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return Creator.FullName;
|
||||
// }
|
||||
//}
|
||||
|
||||
//public string UpdatorFullname
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return Updator.FullName;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user