Blame view

HHECS.Model/Entity/BaseModel.cs 824 Bytes
liufu authored
1
2
using System;
using System.Collections.Generic;
3
4
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
liufu authored
5
6
7
8
9
10
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HHECS.Model
{
11
    public class BaseModel : INotifyPropertyChanged
liufu authored
12
    {
13
14
15
        [Key]
        public int? Id { get; set; }
        public DateTime? Created { get; set; }
liufu authored
16
        public string CreatedBy { get; set; }
17
        public DateTime? Updated { get; set; }
liufu authored
18
        public string UpdatedBy { get; set; }
19
20
21
22
23
24
25
26
27
28

        public event PropertyChangedEventHandler PropertyChanged;

        protected void HandlerPropertyChanged(string prop)
        {
            if (PropertyChanged != null)
            {
                this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(prop));
            }
        }
liufu authored
29
30
    }
}