start job system

This commit is contained in:
hydrant
2019-05-13 12:51:30 +02:00
parent 501c9ba0e7
commit d87bbd5a9c
3 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
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;
}
}
}