Skip to content

ByteArrayType for Entity Framework RowVersion/[TimeStamp] #3132

Answered by gojanpaolo
OneLogicalMyth asked this question in Q&A

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

You must be logged in to vote
6 replies
@OneLogicalMyth

@OneLogicalMyth

@OneLogicalMyth

@michaelstaib

@eduardomhg

You must be logged in to vote
3 replies
@OneLogicalMyth

@michaelstaib

@JoepLijnen

Answer selected by OneLogicalMyth

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