TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
beka
NA
6
0
Data service - WCF with linq
Dec 4 2009 2:31 AM
can somebody helps me to write little simple example , without entity framework
I write somethin like this but it write error
cannot imlicitly convert type 'System.collections.generic ......'
in service1.svc.cs
[code]
public class Service1 : IService1
{
private GNSCWCF.MyDataClassesDataContext MyLinqDc = new GNSCWCF.MyDataClassesDataContext();
public class UserData
{
public int UserID { get; set; }
public string Name { get; set; }
public string Surname { get; set; }
public string Birthday { get; set; }
public string PiradiNomeri { get; set; }
public string Adress { get; set; }
public string Phone { get; set; }
public string DateCreate { get; set; }
}
public List<UserData> GetUserData()
{
//IQueryable<PacientLinqDc.Pacients> query = from p in PacientLinqDc.Pacients select p;
var query = from p in MyLinqDc.Users select p;
return query.ToList();
}
[/code]
And in IService1.cs
[code]
[ServiceContract]
public interface IService1
{
[OperationContract]
List<GNSCWCF.Service1.UserData> GetUserData();
}
[/code]
Reply
Answers (
0
)
Retrieving large xml from columns of type 'xml' in sql server 2005, using WCF
how to handel session in wcf