Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World Example #54

Open
ludgerey opened this issue Dec 2, 2014 · 7 comments
Open

Hello World Example #54

ludgerey opened this issue Dec 2, 2014 · 7 comments
Labels

Comments

@ludgerey
Copy link

ludgerey commented Dec 2, 2014

Is there a Hello World Example for trying out what you did? Somehow I have troubles putting everything together from the docs. Would be great to have a example file that works out of the box, that I can use after installing every required package.

@tpluscode
Copy link
Contributor

I'll come up with some hello world project.

In the mean time could you elaborate what isn't clear in the docs so that it can be improved?

@ludgerey
Copy link
Author

ludgerey commented Dec 2, 2014

So to use the provided functionality of your library I need that context I get from a EntityContextFactory.
I simply copy-pasted this:

var contextFactory = new EntityContextFactory();
var dnrTripleStore = new VDS.RDF.TripleStore();
contextFactory.WithDotNetRDF(dnrTripleStore);

I get compile errors (in german) saying something like EntityContextFactory doesn't contain a definition for "WithDotNetRDF" and the extension method in EntityContextFactoryExtensions has some invalid arguments.

So I don't know if there is a problem with the library, some configuration errors or I got the docs wrong. Because of that I Hello-World-Example would be really nice ;)

Plus, it would make it more clear what the matter of that mapping is. I didn't understand yet why I need that.
EDIT: To be more specific: I mean that contextFactory.WithMappings()

Note: I never used Hibernate and I only need in-memory triple stores.

@tpluscode
Copy link
Contributor

I will try to create a sample today in the afternoon.

The compile error could mean you don't have the dotNetRdf package. Have you installed RomanticWeb.dotNetRDF from NuGet?

About mappings, have you read this page in the docs? It should explain what they are for. You then need to let the context factory know where your mappings are, that's what the WithMappings method is for.

@tpluscode
Copy link
Contributor

This should get you started: https://github.com/MakoLab/RomanticWeb.Sample

It shows how to use a dotNetRDF triple store, does some LINQ and data manipulation before saving back to an output file.

@ludgerey
Copy link
Author

Thanks for the example. It really helped.

And yes I got RomanticWeb.dotNetRDF from NuGet, which installs a version of dotNetRDF which is obviously incompatible with RomanticWeb.dotNetRDF. When I explicitly installed version 1.0.3 (like in the example) with Install-Package dotNetRDF -Version 1.0.3 it worked.

@tpluscode
Copy link
Contributor

Interesting. What exactly was the problem with the dotNetRDF and which version got installed by default?

@ludgerey
Copy link
Author

dotNetRDF Version 1.0.0.2473 gets installed. But I am not quite sure if it was my fault (because I forgot using RomanticWeb.DotNetRDF) or actually because of the version. I will keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants