24 lines
542 B
C#
24 lines
542 B
C#
using ToolsModule.Attributes;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Runtime.Serialization;
|
|
|
|
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();
|
|
}
|
|
}
|
|
} |