开发者

Linq-to-SQL- A stored procedure returns field which is not there in Mapped Table Info

开发者 https://www.devze.com 2022-12-25 18:47 出处:网络
We are using Linq-to-SQL with stored Procedures we need help on one of our problem. We are having user tables which is having all field required for user table like firstname,lastname and other fields

We are using Linq-to-SQL with stored Procedures we need help on one of our problem. We are having user tables which is having all field required for user table like firstname,lastname and other fields that table is also there in our DBML files.Now the problem is that we are having a stored procedure that is mapped to table->User returning a field called fullname (Combination of firstname and lastname)which is not there in usertable. So what is the best way to slove this.

Another thing is that one of other stored procedure retur开发者_运维技巧n inner join of two tables with mix columns in this case how can i mapped that stored procedure with Table mapped info class in our dbml files.


We recommend you to use a computed property defined in the partial class. It will not be influenced by code regeneration in case any changes are made to the model.
For the table with mixed columns one of possible solutions is to create a view in the database with a structure identical to the set of mixed columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消