Ravendb - нужен простой пример, используя EmbedDableDocumentstore?
Вопрос
Я экспериментирую с Ravendb, встроенным в мое приложение. Я получаю «Тип 'embedDableDocumentStore' не определен» ошибка. Я, однако, имею ссылку на Raven.client.embeded в моем проекте.
Вот мой код vb.net:
Imports Raven.Client.Client
Imports Raven.Client
Sub Main()
Dim documentStore As EmbeddableDocumentStore = New EmbeddableDocumentStore()
documentStore.DataDirectory = "c:\dbdata"
documentStore.Initialize()
Dim session As Document.DocumentSession = documentStore.OpenSession()
session.Store(New LineItem With {
.draftpostingdate = Nothing,
.forumdate = "#12/1/2010#",
.pfvolume = Nothing,
.pfissue = Nothing,
.change = "change",
.sectiontext = "Revision",
.rs = Nothing,
.revisionid = 51438,
.mononum = "100249",
.webtype = "PCA"
})
session.SaveChanges()
Dim lineItems = session.Query(Of LineItem)()
For Each li As LineItem In lineItems
Console.WriteLine(li.mononum)
Next
End Sub
Решение
У меня были похожие проблемы раньше, когда я нацелился на неверную структуру. Вы проверяли, что не нацелены на «профиль клиента» в своем проекте? Если я правильно помню, вы должны нацелиться на полную структуру при использовании встроенного клиента.
Не связан с StackOverflow