Merge remote-tracking branch 'origin/feature-DeviceRegistration' into feature-DeviceRegistration

This commit is contained in:
Stefan
2023-04-19 11:12:58 +02:00
3 changed files with 9 additions and 2 deletions
@@ -12,4 +12,5 @@ public class MainDatabaseContext : DbContext
public DbSet<User> Users { get; set; } public DbSet<User> Users { get; set; }
public DbSet<Device> Devices { get; set; } public DbSet<Device> Devices { get; set; }
public DbSet<Event> Events { get; set; }
} }
@@ -35,5 +35,5 @@ public class Device
Room = room; Room = room;
} }
private Device(){} private Device(){}
} }
@@ -1,7 +1,13 @@
namespace Elektrifikatsiya.Models using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Elektrifikatsiya.Models
{ {
public class Event public class Event
{ {
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; private set; }
public string EventName { get; set; } public string EventName { get; set; }
public string Description { get; set; } public string Description { get; set; }
public DateTime Date { get; set; } public DateTime Date { get; set; }