summaryrefslogtreecommitdiffstats
path: root/src/Data/Models/CoreDataModel.cs
blob: a675ff16bb06bfe5f8661214dab1993deb7a8ac0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;

namespace IOL.Fagprove.Data.Models
{
    public class CoreDataModel
    {
        public Guid Id { get; set; }
        public DateTime? CreatedUtc { get; set; }
        public Guid? CreatedBy { get; set; }
        public DateTime? ModifiedUtc { get; set; }
        public Guid? ModifiedBy { get; set; }

        public void SetIsUpdating(bool isUpdating = true)
        {
            if (isUpdating)
            {
                Id = Id;
                CreatedUtc = CreatedUtc;
                CreatedBy = CreatedBy;
                ModifiedBy = ModifiedBy;
                ModifiedUtc = ModifiedUtc;
            }
        }
    }
}