Created
January 27, 2018 18:55
-
-
Save amarwadi/e13d6c6e9034df814a0ab04624c47bd0 to your computer and use it in GitHub Desktop.
Installment Class Mappings using Bson Mappers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InstallmentMap | |
{ | |
public void Map() | |
{ | |
BsonClassMap.RegisterClassMap<Installment>(map => | |
{ | |
map.AutoMap(); | |
map.SetIgnoreExtraElements(true); | |
map.MapIdMember(x => x.Id); | |
map.MapMember(x => x.Title).SetIsRequired(true); | |
map.MapMember(x => x.InstallmentFrequencyInDays).SetIsRequired(true); | |
map.MapMember(x => x.DownPayment).SetIsRequired(true); | |
map.MapMember(x => x.TotalInstallments).SetIsRequired(true); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment