Beispiel #1
0
 public static T SqlExecuteGet <T>(string procName, DynamicParameters parms, string outParamName, string connectionName)
 {
     using (SqlConnection connection = MsSqlMapperHepler.GetOpenConnection(connectionName))
     {
         var x = connection.Execute(procName, (object)parms, commandType: CommandType.Text, commandTimeout: commandTimeout);
         return(parms.Get <T>("@" + outParamName));
     }
 }
Beispiel #2
0
 public static U StoredProcInsertWithID <T, U>(string procName, DynamicParameters parms, string connectionName)
 {
     using (SqlConnection connection = MsSqlMapperHepler.GetOpenConnection(connectionName))
     {
         var x = connection.Execute(procName, (object)parms, commandType: CommandType.StoredProcedure, commandTimeout: commandTimeout);
         return(parms.Get <U>("@ID"));
     }
 }