Skip to content

Commit 8a49ea7

Browse files
committed
Fix MongoDB references not imported automatically
1 parent 0300c62 commit 8a49ea7

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Linq2MongoDB.LINQPadDriver/DataContextSourceGenerator.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public void Dispose()
6666
private readonly Lazy<QueryableMongoCollection> _{0};
6767
public QueryableMongoCollection {0} => _{0}.Value;";
6868

69-
private static string SanitizeName(string name)
70-
=> new string(Array.FindAll(name.ToCharArray(), c => char.IsLetterOrDigit(c) || c == '_'));
7169

7270
public static string GenerateSource(string nameSpace, string typeName, ICollection<CollectionItem> collectionNames)
7371
{

Linq2MongoDB.LINQPadDriver/Linq2MongoDB.LINQPadDriver.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Title>MongoDB LINQPad driver</Title>
1818
<Description>MongoDB LINQPad driver that allows you to access MongoDB using Linq queries without having to provide custom assembly types</Description>
1919
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
20-
<Version>1.0.1</Version>
20+
<Version>1.0.2</Version>
2121
<PackageReadmeFile>README.md</PackageReadmeFile>
2222
</PropertyGroup>
2323
<ItemGroup>

Linq2MongoDB.LINQPadDriver/MongoDriver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public override bool AreRepositoriesEquivalent(IConnectionInfo c1, IConnectionIn
3838

3939
public override IEnumerable<string> GetAssembliesToAdd(IConnectionInfo cxInfo)
4040
{
41-
return new[] { "*", cxInfo.CustomTypeInfo.GetAbsoluteCustomAssemblyPath() };
41+
return new[] { "*" };
4242
}
4343

4444
public override IEnumerable<string> GetNamespacesToAdd(IConnectionInfo cxInfo)
4545
{
4646
return new[]
4747
{
4848
"MongoDB.Driver",
49-
"MongoDB.Driver.Linq",
49+
"MongoDB.Bson",
5050
};
5151
}
5252

0 commit comments

Comments
 (0)