diff options
| author | ivar <i@oiee.no> | 2025-10-19 23:41:23 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-10-19 23:41:23 +0200 |
| commit | 3f4c0720e1e3421431e7baa20882a4a4512a7fab (patch) | |
| tree | 734ca81d7d0841d8863e3f523ebba14c282dc681 /src/Data/Models/CoreDataModel.cs | |
| download | fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.tar.xz fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.zip | |
Diffstat (limited to 'src/Data/Models/CoreDataModel.cs')
| -rw-r--r-- | src/Data/Models/CoreDataModel.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Data/Models/CoreDataModel.cs b/src/Data/Models/CoreDataModel.cs new file mode 100644 index 0000000..a675ff1 --- /dev/null +++ b/src/Data/Models/CoreDataModel.cs @@ -0,0 +1,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; + } + } + } +} |
