input-parameters

How to call stored procedure in Entity Framework Core with input and output parameters using mysql

走远了吗. 提交于 2020-04-16 02:18:07
问题 I am using ASP.net Core 2.2 with Entity Framework core 2.2.6 and Pomelo.EntityFrameworkCore.MySql 2.2.0 for connectivity with MySQL, I have a stored procedure which takes 3 input parameters and 1 output parameter. I am able to call it in MySQL workbench like CALL GetTechniciansByTrade('Automobile', 1, 10, @total); select @total; Now I want to call this using entity framework core, the code I am currently using is var outputParameter = new MySqlParameter("@PageCount", MySqlDbType.Int32);

Passing variable by Ref. or Value Dilemma

邮差的信 提交于 2020-01-06 11:49:52
问题 I have some void methods which are static. Is it better to pass variables by reference or by value, because I'm passing large amount of text into these variables : public static void renderText(ref StringBuilder build) { //Do your job. } So could someone explain me, what happens when I send a reference of StringBuilder , does it only access this StringBuilder ? (It does not copy it right!). And just in case I'm not changing the value or any other property of input arguments into methods. So,

Passing variable by Ref. or Value Dilemma

蓝咒 提交于 2020-01-06 11:49:33
问题 I have some void methods which are static. Is it better to pass variables by reference or by value, because I'm passing large amount of text into these variables : public static void renderText(ref StringBuilder build) { //Do your job. } So could someone explain me, what happens when I send a reference of StringBuilder , does it only access this StringBuilder ? (It does not copy it right!). And just in case I'm not changing the value or any other property of input arguments into methods. So,

Using input parameter as an optional input

99封情书 提交于 2019-12-14 02:17:25
问题 Using wso2, DSS version 3.01, I am trying to have an input parameter that could be an optional parameter. A user can say, give me all the info for this specific code, or if a user does not specify any code, I want to give all the rows of data. Can you help? 回答1: Instead of creating a query for each optional parameter, you can also do the following: <query id="selectEmployees" useConfig="default"> <sql>select * from Employees where (:employeeNumber is null or employeeNumber = :employeeNumber)<

How to pass a Swift string to a c function?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 14:53:45
问题 I am having serious trouble passing a string from swift, to a function written in c. I'm trying to do this in my swift code var address = "192.168.1.2" var port = 8888 initSocket(address, port) The c function looks like this: void initSocket(char *address, int port); Im getting the error: Cannot convert the expression's of type 'Void' to type 'CMutablePointer' I can't seem to find a solution that works. 回答1: Swift CStrings work seamlessly with C constant strings, so use void initSocket(const

WCF and Input Parameter Order in SOAP Envelope

六眼飞鱼酱① 提交于 2019-12-05 00:40:58
问题 I'm getting an Object reference not set to an instance of object error in my WCF web service which uses webHttpBinding (soap 1.1) I have noticed that if you have the input parameters in a certain order the error does not get raised. i.e. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:not="http://schemas.globalfoundries.com/NotificationService"> <soapenv:Header/> <soapenv:Body> <not:NotifyWorkflowItemUpdate> <not:userIDs>testUserID</not:userIDs> <not:taskID

WCF and Input Parameter Order in SOAP Envelope

♀尐吖头ヾ 提交于 2019-12-03 16:22:17
I'm getting an Object reference not set to an instance of object error in my WCF web service which uses webHttpBinding (soap 1.1) I have noticed that if you have the input parameters in a certain order the error does not get raised. i.e. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:not="http://schemas.globalfoundries.com/NotificationService"> <soapenv:Header/> <soapenv:Body> <not:NotifyWorkflowItemUpdate> <not:userIDs>testUserID</not:userIDs> <not:taskID>testTaskID</not:taskID> <not:taskType>testTaskType</not:taskType> <not:status>testStatus</not:status>