Coder Social home page Coder Social logo

Comments (6)

marrony avatar marrony commented on June 27, 2024

Hi @wingertge, using the attribute FaunaField to rename the field didn't solve your problem or this is not a possibility?

from faunadb-csharp.

wingertge avatar wingertge commented on June 27, 2024

I didn't see that anywhere in the documentation so I didn't know about it. In general I find the documentation rather lacking, a simple list of functions with their signatures doesn't help all that much. Anyways, that would solve the issue. I still think it's odd that the To method doesn't do this by default though - especially since the driver already uses Newtonsoft.Json as a dependency.

from faunadb-csharp.

marrony avatar marrony commented on June 27, 2024

What documentation you're referring? We should take that into consideration to improve our docs for other users

from faunadb-csharp.

wingertge avatar wingertge commented on June 27, 2024

I'm talking about the docs available on the website. It doesn't really cover many of the common usecases. For example, deleting or updating a record based on a single index match is a pretty common usecase, but the only mention of delete/update is using a ref. I managed to somewhat figure it out with the Roslyn REPL and a local DB instance, but that kind of thing should be on the docs.

That's really the main issue I meant. It could use more documentation on common real life use cases.

from faunadb-csharp.

eaceaser avatar eaceaser commented on June 27, 2024

Thanks for the feedback! I'll file a ticket internally to make the serialization/deserialization behavior match Newtonsoft.Json conventions a bit closer. I'll leave this ticket open to keep you updated on the progress.

As far as the docs go:

  • Right now, you're absolutely right. There's a gap between the pure reference documentation and our tutorials, which are a bit higher level. We're working on improving the docs, but in the meantime, if you haven't already, drop into our Gitter chat (https://gitter.im/fauna/Lobby) with questions.

  • We should be publishing csharp specific API documentation. I'll file a ticket to make sure we publish these.

from faunadb-csharp.

goncalo-oliveira avatar goncalo-oliveira commented on June 27, 2024

The casing really is annoying. The driver expects the property name to match exactly the field name and in .NET, properties usually start with an uppercase. The workaround is simple, to use the FaunaField attribute with the proper casing... But this equally annoying and adds unnecessary clutter to the model.
I think that the matching should be case-insensitive, like Newtonsoft.Json converter does by default (or System.Text.Json).

It also annoys me that I can't deserialize into a generic Dictionary<string, object - or haven't figured out how, yet.

from faunadb-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.