Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Model;
- using Model.States;
- using MongoDB.Bson.Serialization;
- namespace Infrastructure.Database
- {
- public static class EntityMappings
- {
- public static void Map()
- {
- BsonClassMap.RegisterClassMap<Raspberry>(x =>
- {
- x.AutoMap();
- x.SetIgnoreExtraElements(true);
- x.MapIdMember(y => y.Id);
- });
- BsonClassMap.RegisterClassMap<Sensor>(x =>
- {
- x.AutoMap();
- x.SetIgnoreExtraElements(true);
- x.MapIdMember(y => y.Id);
- });
- BsonClassMap.RegisterClassMap<SensorState>(x =>
- {
- x.AutoMap();
- x.SetIgnoreExtraElements(true);
- x.MapIdMember(y => y.Id);
- });
- BsonClassMap.RegisterClassMap<State>(x =>
- {
- x.AutoMap();
- x.SetIgnoreExtraElements(true);
- x.MapIdMember(y => y.Id);
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement