private EntertainmentService1.Comment ConvertToWCFComments(Models.Comment comment) { //EntertainmentService1.User tempUser = new EntertainmentService1.User //{ // Id = comment.User.Id, // Name = comment.User.Name //}; EntertainmentService1.Comment temp = new EntertainmentService1.Comment { Id = comment.Id, Entertainment_Id = comment.Entertainment_Id, //User = comment.User, //slet mig //User = tempUser, Message = comment.Message }; return(temp); }
public void InsertComment(Models.Comment c) { EntertainmentService1.EntertainmentServiceClient sC = new EntertainmentService1.EntertainmentServiceClient(); EntertainmentService1.Comment comment = ConvertToWCFComments(c); sC.InsertComment(comment); }