Can't find .InitOneToMany method for extended classes from :Entity
See original GitHub issueHello,
I’ve installed MongoDB.Entities with Nuget.
DB.InitAsync is working…I can create flat documents and I can see them in Mongo database.
However, when I try to create a Many<> relationship I can’t find .Hello,
I’ve installed MongoDB.Entities with Nuget.
DB.InitAsync is working…I can create flat documents and I can see into Mongo DB.
However, when I try to create a Many<> relationship I can’t find .InitOneToMany method in my constructor.
I understand that this is an extension method, so all inherited from :Entity or :IEntity should be able to use this method.
see my code snipped below:
public class Ship: MongoDB.Entities.Entity {
public string Name { get; set; }
public Ship() {
}
}
public class Station : MongoDB.Entities.Entity {
public string Name { get; set; }
public MongoDB.Entities.Many<Ship> Ships { get; set; }
public Station() {
//at this point, there is no .InitOneToMany
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to extend entity class?
I'm using Entity Framework and Mysql. And I have Entity classes for each tables. But I do not know how to extend fields...
Read more >c# extending a entity framework class
I have a Entity Framework class that was derived from the database layout. I was wondering if there was any problems by extending...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My bad…I had another namespace (package) starting with MongoDB
I’ve removed it or renamed it so it is working now.
congrats for your project, awesome 😃
solved, see above 😃