You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I use the fluent mapping support. I cannot seem to get it to work properly.
I define the mapping below since the object dont have an ID property but that doesnt work when inserting the document to the database.
I I used BSonmapper then the fluent mapping works but it doesnt support the fsharp types.
letcreateDatabaseUsing(store:Store)(config:AppSettings)=letmapper= FSharpBsonMapper()
mapper.Entity<ServiceRequestAssignment>().Id(fun a -> a.RequestId)|> ignore
mapper.Entity<SpSite>().Id(fun a -> a.SiteUrl)|> ignore
letdb=match store with| Store.InMemory ->letmemoryStream=new MemoryStream()new LiteDatabase(memoryStream, mapper)| Store.LocalDatabase ->letdbFile= config.Database.File
new LiteDatabase(dbFile, mapper)
db
Exception
Could you suggest what I am doing wrong here?
The text was updated successfully, but these errors were encountered:
Hi
How do I use the fluent mapping support. I cannot seem to get it to work properly.
I define the mapping below since the object dont have an ID property but that doesnt work when inserting the document to the database.
I I used BSonmapper then the fluent mapping works but it doesnt support the fsharp types.
Exception
Could you suggest what I am doing wrong here?
The text was updated successfully, but these errors were encountered: