我通过添加 - >函数导入在现有模型(edmx)中添加存储过程来运行存储过程.
我收到以下错误.
数据读取器与指定的"dbModel.stored_procedure_Result"不兼容.类型为"UID"的成员在数据读取器中没有相应的具有相同名称的列.
Modle的_Result类如下
public partial class stored_procedure_Result
{
public int UID { get; set; }
public int SYSTEM_ID { get; set; }
public byte ACTIVE { get; set; }
public string LEVEL { get; set; }
public string SYSTEM_CODE { get; set; }
public string SYSTEM_NAME { get; set; }
public Nullable<int> SYSTEM_SUB_TYPE { get; set; }
public Nullable<int> PM_ID { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
此类的底线发生错误
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Core.Objects;
using Company.Product.Domain.Models;
namespace …Run Code Online (Sandbox Code Playgroud)