Skip to content

ByteArrayType for Entity Framework RowVersion/[TimeStamp] #3132

Answered by gojanpaolo
OneLogicalMyth asked this question in Q&A
Discussion options

You must be logged in to vote

Explicitly configuring the RowVersion field to be of Type<ByteArrayType> should resolve the error:

public class MyObjectObjectType : ObjectType<MyObject>
{
    protected override void Configure(IObjectTypeDescriptor<MyObject> descriptor)
    {
        descriptor
            .Field(_ => _.RowVersion)
            .Type<ByteArrayType>();
    }
}

// in Startup ConfigureServices
services
    .AddGraphQLServer()
    .AddType<MyObjectObjectType>()
    ...

It may be a bug on HC implicit configuration for byte[] when ByteArrayType is added.

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@OneLogicalMyth
Comment options

@OneLogicalMyth
Comment options

@OneLogicalMyth
Comment options

@michaelstaib
Comment options

@eduardomhg
Comment options

Comment options

You must be logged in to vote
3 replies
@OneLogicalMyth
Comment options

@michaelstaib
Comment options

@JoepLijnen
Comment options

Answer selected by OneLogicalMyth
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants