GetQuery and Delete method of MongoDbRepositoryBase throwing null exception

15 views
Skip to first unread message

puzit raj Singh K.R

unread,
May 19, 2015, 7:27:33 AM5/19/15
to sharpre...@googlegroups.com
Hi,

I am getting null exception when trying to access getQuery and Delete methods.  it is not getting SerializationOptions set. 

By using other overload method made it work while finding by ID

  var keyBsonType = ((RepresentationSerializationOptions)BsonClassMap.LookupClassMap(typeof(T)).IdMemberMap.SerializationOptions).Representation;

            return IsValidKey(key)
                           ? BaseCollection().FindOneById(BsonTypeMapper.MapToBsonValue(key))
                           : default(T);

Regards, 
Reply all
Reply to author
Forward
0 new messages