DepartmentProject/DepartmentPortal/Common/DatabaseCore/Models/IdEntity.cs

24 lines
542 B
C#
Raw Normal View History

using ToolsModule.Attributes;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
2022-03-18 22:55:48 +04:00
namespace CoreDatabase.Models
{
/// <summary>
/// Тип Id для всеъ сущностей
/// </summary>
[DataContract]
public class IdEntity
{
[DataMember]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[MapConfiguration("Id")]
public Guid Id { get; set; }
public IdEntity() : base()
{
Id = Guid.NewGuid();
}
}
}