从存储过程中获取数据

时间:2012-10-23 23:04:40

标签: entity-framework stored-procedures

我创建了一个存储过程来获取像select * from customer这样的数据,然后我通过1个函数getcustomer在Entity Framework中创建了一个模型。我应该编写什么代码来从存储过程中获取列表?

public List<Customer> getCustomerWithsp()
    {
        Database1Entities1 context = new Database1Entities1();
        List<Customer> cust = new List<Customer>();
        cust = context.getcustomer().tolist(); //What should I write here?
        return cust;
    }

0 个答案:

没有答案