This commit is contained in:
Friend2868
2023-04-19 10:12:13 +02:00
parent 12b8004a93
commit 9eedadec4a
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<Device> Devices { get; set; }
public DbSet<Event> Events { get; set; }
}
@@ -35,5 +35,5 @@ public class Device
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
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; private set; }
public string EventName { get; set; }
public string Description { get; set; }
public DateTime Date { get; set; }