Search the Community
Showing results for tags 'Entity Framework Core'.
Found 1 result
-
I'm trying to add a SQL Server Database to my RAGE server, using Entity Framework Core. I've created a resource and a separate project (in the same solution) for the database, getting to the following folder structure: and my Main.cs looks like this: using Database; using GTANetworkAPI; using System; namespace LoginRegister { public class Main : Script { [ServerEvent(Event.ResourceStart)] public void EventOnResourceStart() { try { using var context = new ServerDbContext(); } catch (Exception e) { Console.WriteLine("ERROR!"); } } } } And when I run server.exe, I get the following error in the console (which disappears when I remove the DbContext creation part from EventOnResourceStart:
