Files
reallife-gamemode/ReallifeGamemode.Server/Entities/JobVehicle.cs
2019-05-13 12:51:30 +02:00

20 lines
561 B
C#

using Microsoft.EntityFrameworkCore;
using ReallifeGamemode.Server.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ReallifeGamemode.Server.Entities
{
public class JobVehicle : ServerVehicle
{
public virtual Job Job { get; set; }
public override string ToString()
{
using (var dbContext = new DatabaseContext())
return "Job Fahrzeug | Job: " + dbContext.JobVehicles.Include(j => j.Job).First(j => j.Id == this.Id).Job.Name;
}
}
}