News for hackers. Stuff that matters.
Re:Startup Engineers and Our Mistakes with MongoDB by scarface74 on Wednesday July 19, 2017 @05:17PM (#14808022)
Yes. When you use Entity Franework's generator to map from a database table to a class, it not only maps the types from the database to your class, it also maps constraints like charactr length, nullable fields vs. non nullable fields, etc.

The same for Mongo if you are using the C# driver. If you get a Mongo collection using the standard C# syntax --

var collection = database.GetCollection<Users>("Users");

You will work with a strongly typed "schema". As long as you are working with the "collection" object, you will be working with strongly typed objects and doing type safe Linq queries.

There are no comments on this comment yet.