From a7254242bc94bc2f7ddd269088ce7e7870b7ab28 Mon Sep 17 00:00:00 2001
From: esantangelo <enzo020895@gmail.com>
Date: Mon, 7 Dec 2020 21:12:44 -0300
Subject: [PATCH] delete grade entity

---
 Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs  | 16 ----------
 Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs     | 21 --------------
 .../EntityConfiguration/GradeConfiguration.cs | 29 -------------------
 3 files changed, 66 deletions(-)
 delete mode 100644 Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs
 delete mode 100644 Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs
 delete mode 100644 Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs

diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs
deleted file mode 100644
index 4876ec9..0000000
--- a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Text.Json.Serialization;
-
-namespace Tsi1.BusinessLayer.Dtos
-{
-    public class GradeDto
-    {
-        public int ActivityId { get; set; }
-
-        public int UserId { get; set; }
-
-        public decimal Value { get; set; }
-    }
-}
diff --git a/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs b/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs
deleted file mode 100644
index c5c05e7..0000000
--- a/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Tsi1.DataLayer.Entities
-{
-    public class Grade
-    {
-        public int ActivityId { get; set; }
-
-        public int StudentId { get; set; }
-
-        public decimal Value { get; set; }
-
-        public DateTime Date { get; set; }
-
-        public Student Student { get; set; }
-
-        public Activity Activity { get; set; }
-    }
-}
diff --git a/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs b/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs
deleted file mode 100644
index d8596a9..0000000
--- a/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tsi1.DataLayer.Entities;
-
-namespace Tsi1.DataLayer.EntityConfiguration
-{
-    public class GradeConfiguration : IEntityTypeConfiguration<Grade>
-    {
-        public void Configure(EntityTypeBuilder<Grade> builder)
-        {
-            builder.HasKey(x => new { x.ActivityId, x.StudentId});
-
-            builder.Property(x => x.Value)
-                .IsRequired()
-                .HasColumnType("NUMERIC(5,2)");
-
-            builder.HasOne(x => x.Activity)
-                .WithMany(x => x.Grades)
-                .HasForeignKey(x => x.ActivityId);
-
-            builder.HasOne(x => x.Student)
-                .WithMany(x => x.Grades)
-                .HasForeignKey(x => x.StudentId);
-        }
-    }
-}
-- 
GitLab