简体   繁体   中英

Aliasing db4o between C# and F#

I have created a db4o database in a C# solution called SyncManage2. That is the assembly name, and also the namespace. There is a class in there called DicEntry.

I want to access that database from another C# solution called SyncText2, which contains two projects, one of which is an F# project with the assembly name of GlossWorks, which does the database work. The F# database code lives in a module called Glossing.

So, how to set up a TypeAlias? I've tried every combo I can think of, but no joy

let openDictionary():IEmbeddedObjectContainer =
   let alyas = TypeAlias("SyncManage2.DicEntry,SyncManage2","Glossing.DicEntry,GlossWorks")

-- all the way up to --

    let alyas = TypeAlias("SyncManage2.DicEntry,SyncManage2", "SyncText2.GlossWorks.Glossing.DicEntry,GlossWorks")

but I can't access it.

The ObjectManager showed simply: 'SyncManage2.DicEntry, SyncManage2'

What am I missing?

好吧,我用另一种方式来管理它-让F#应用程序GlossWorks(带有模块Glossing和Type DicEntry)构建db4o数据库,然后从另一个名为SyncView2的C#应用​​程序使用类DicEntry访问它。

TypeAlias alyas = new TypeAlias("Glossing+DicEntry, GlossWorks", "SyncView2.DicEntry, SyncView2");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM