formatted code

This commit is contained in:
Lennart Kampshoff
2019-05-05 17:59:11 +02:00
parent a34c03eae9
commit a88d5256a8
54 changed files with 290 additions and 210 deletions

View File

@@ -1,5 +1,8 @@
using System;
using ReallifeGamemode.Server.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
namespace ReallifeGamemode.Server.Entities
@@ -8,6 +11,17 @@ namespace ReallifeGamemode.Server.Entities
{
public Group Group { get; set; }
[ForeignKey("Group")]
public int? GroupId { get; set; }
public Group GetGroup()
{
using (var dbContext = new DatabaseContext())
{
return dbContext.Groups.Where(g => g.Id == GroupId).FirstOrDefault();
}
}
public override string ToString()
{
return "Gruppen Fahrzeug | Gruppe: " + Group.Name;