From 9b15dc4c8b9cc41d50eae15d3fcf5aae30feaa46 Mon Sep 17 00:00:00 2001 From: Nick DiChiaro Date: Fri, 3 Jan 2025 22:04:22 -0500 Subject: [PATCH] add net8 launch config --- .vscode/launch.json | 15 ++++++++++++++- tests/Demo.App/TestDb.cs | 21 --------------------- 2 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 tests/Demo.App/TestDb.cs diff --git a/.vscode/launch.json b/.vscode/launch.json index 2618e93..6edc31e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": ".NET Core Launch (console)", + "name": ".NET Core Launch (net9)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", @@ -17,6 +17,19 @@ "console": "internalConsole", "stopAtEntry": false }, + { + "name": ".NET Core Launch (net8)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/src/Tools.Net.Mongo/bin/Debug/net8.0/Tools.Net.Mongo.dll", + "args": ["migrate", "up", "-i", "mongodb://localhost:27017/demoDb"], + "cwd": "${workspaceFolder}/tests/Demo.App", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, { "name": ".NET Core Attach", "type": "coreclr", diff --git a/tests/Demo.App/TestDb.cs b/tests/Demo.App/TestDb.cs deleted file mode 100644 index 9c329c7..0000000 --- a/tests/Demo.App/TestDb.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using MongoDB.Driver; -using Tools.Net.Mongo.Core; - -namespace Demo.App; - -public class User -{ - [BsonId] - [BsonRepresentation(BsonType.ObjectId)] - public string Id { get; set; } = ""; - - public required string FirstName { get; set; } - public required string LastName { get; set; } -} - -public class TestDb(string connectionString) : MongoDbContext(connectionString) -{ - public required IMongoCollection Users { get; set; } -}