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

Consider an object overload for SqlServerDbFunctionsExtensions #20962

Open
ajcvickers opened this issue May 14, 2020 · 1 comment
Open

Consider an object overload for SqlServerDbFunctionsExtensions #20962

ajcvickers opened this issue May 14, 2020 · 1 comment

Comments

@ajcvickers
Copy link
Contributor

ajcvickers commented May 14, 2020

We currently have the following overloads:

        public static int? DataLength(this DbFunctions _, string arg)
        public static int? DataLength(this DbFunctions _, bool? arg)
        public static int? DataLength(this DbFunctions _, double? arg)
        public static int? DataLength(this DbFunctions _, decimal? arg)
        public static int? DataLength(this DbFunctions _, DateTime? arg)
        public static int? DataLength(this DbFunctions _, TimeSpan? arg)
        public static int? DataLength(this DbFunctions _, DateTimeOffset? arg)
        public static int? DataLength(this DbFunctions _, byte[] arg)
        public static int? DataLength(this DbFunctions _, Guid? arg)

The main use case for an object overload is when a value converter is being used in the model such that the type in the application is not one of the types above, but the type in the database is still something that DATALENGTH can be called with.

@ajcvickers
Copy link
Contributor Author

The same may be true for other methods here, such as the DateDiff overloads.

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

No branches or pull requests

1 participant