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

Type conversion - bigint to timespan #394

Closed
timmac-qmc opened this issue Nov 4, 2022 · 1 comment
Closed

Type conversion - bigint to timespan #394

timmac-qmc opened this issue Nov 4, 2022 · 1 comment

Comments

@timmac-qmc
Copy link
Contributor

I can't find any documentation about support for type conversions.
I need to bind a MudBlazor TimePicker to a timespan variable, this would normally be stored as a bigint in the database and converted by EF
see: https://stackoverflow.com/questions/17129795/storing-timespan-with-entity-framework-codefirst-sqldbtype-time-overflow

EF can do this conversion automatically with annotations but I can't find a way to tell efg to add this to the generated model

[Column(TypeName = "bigint")]
    public TimeSpan Span { get; set; }

Any help would be appreciated.

@timmac-qmc
Copy link
Contributor Author

Nevermind, worked out setting database type to "time(7)" lets EFG create a timespan field.

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

No branches or pull requests

1 participant