/// <summary> /// Converts FlixNet comment to service Comment so that /// </summary> /// <param name="comment"></param> /// <returns>ServiceLibrary.Comment</returns> private ServiceLibrary.Comment ConvertToWCFComments(Models.Comment comment) { ServiceLibrary.Session session = new ServiceLibrary.Session { Session_id = comment.User.Session.Session_id }; ServiceLibrary.User user = new ServiceLibrary.User { Id = comment.User.Id, Session = session }; ServiceLibrary.Comment tempComment = new ServiceLibrary.Comment { Entertainment_Id = comment.Entertainment_Id, User = user, Message = comment.Message }; return(tempComment); }
/// <summary> /// Inserts a Comment object on a specific movie /// </summary> /// <param name="c"></param> public void InsertComment(Models.Comment c) { ServiceLibrary.EntertainmentServiceClient sC = new ServiceLibrary.EntertainmentServiceClient(); ServiceLibrary.Comment comment = ConvertToWCFComments(c); sC.InsertComment(comment); }