使用Oracle.ManagedDataAccess.Core驱动程序的asp.net核心连接oracle

时间:2019-04-19 06:43:54

标签: c# .net core

asp.net核心mvc应用程序显示中文乱码!!!     1,asp.net核心2.2     2,数据库:oracle 10g        NLS_LANGUAGE =美国;        NLS_TERRITORY =美洲;        NLS_ISO_CURRENCY =美洲;        NLS_CHARACTERSET = US7ASCII;     3,驱动程序:Oracle.ManagedDataAccess.Core = v2.18.6     4,orm = dapper = 1.60.6     5,我设置了enrironmet变量nls_lang = AMERICAN AMERICA.US7ASCII

    using (IDbConnection con = new OracleConnection(constring))
            {

                con.Open();

                var prescresult = await con.QueryAsync<DrugDetail, DrugPresc,DrugDetail>(prescsql, (a, b) =>
                {
                    a.Presc = b;
                    return a;
                }, new { pid = id }, splitOn: "patient_id");

                return prescresult.ToList();

            }

0 个答案:

没有答案