Saturday, 23 April 2022

parameters default null value

 issue in .net core passing parameter null to parmaeter for sp not working so

i used this tech

https://stackoverflow.com/questions/4153009/operator-cannot-be-applied-to-operands-of-type-string-and-system-dbnull

(object)table.Value ?? DBNull.Value;
 new SqlParameter{ParameterName = "@ProfilePhoto",
                Direction = System.Data.ParameterDirection.Input,
                Value =(object) member.ProfilePhoto ?? DBNull.Value},
https://documentation.help/MS-Enterprise-Library-5.0/EntLib50_d40074bc-fc16-4a1c-8856-60c515e11f3e.html

https://www.learnentityframeworkcore.com/raw-sql

https://visualstudiomagazine.com/articles/2019/07/01/updating-linq.aspx

https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-3

No comments:

Post a Comment

Car pooling app

 I'll create a car pooling app with real-time vehicle tracking, pickup/drop time estimates, and a list of onboard users. Since we don...