Add starter and complete projects for ch 7

This commit is contained in:
Alvin Ashcraft
2023-07-15 14:15:37 -04:00
parent 7d9fe9fb0f
commit 82078fd081
64 changed files with 2946 additions and 0 deletions
@@ -0,0 +1,17 @@
using Dapper.Contrib.Extensions;
using MyMediaCollection.Enums;
namespace MyMediaCollection.Model
{
public class MediaItem
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public ItemType MediaType { get; set; }
[Computed]
public Medium MediumInfo { get; set; }
public LocationType Location { get; set; }
public int MediumId => MediumInfo.Id;
}
}
@@ -0,0 +1,13 @@
using Dapper.Contrib.Extensions;
using MyMediaCollection.Enums;
namespace MyMediaCollection.Model
{
public class Medium
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public ItemType MediaType { get; set; }
}
}