minor model tweaks

This commit is contained in:
Collin M. Barrett 2017-04-09 13:01:58 -05:00
parent 1cedf16d8b
commit 4dfe9f1820
2 changed files with 6 additions and 0 deletions

View file

@ -1,11 +1,15 @@
//https://code.msdn.microsoft.com/Generic-Repository-Pattern-f133bca4/sourcecode?fileId=164016&pathId=1938870460
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FilterLists.Models
{
public class BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public DateTime AddedDate { get; set; }
public DateTime ModifiedDate { get; set; }

View file

@ -1,10 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FilterLists.Models
{
public class List : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int Id { get; set; }
public string Description { get; set; }