Mapping two or more data fields to one object property.

28 views
Skip to first unread message

Pavel Kopitcev

unread,
Oct 30, 2014, 2:46:05 AM10/30/14
to blto...@googlegroups.com
Hello!

 Is it possible to map 2 data fields to one property
 
  For example I have this query:
 
        select FirstName, LastName from User
        

  And I have an object like that:
    
    public class User {
    
        public string Name {get; set;}
    
    }
    
 How to map data? Name should be like FirstName + ' ' + LastName.
 
 I don't have possibility to do it in the query, because of much more complex cases
 
 ps Sorry for double topic
Reply all
Reply to author
Forward
0 new messages