farhad26
جمعه 04 تیر 1395, 14:38 عصر
سلام به همه دوستان
چطور میشه برای یک خبر یا مطلب کامنت گذاشت به صورت Ajax ؟
مثلا ما دو تا کلاس داریم یکی News و یکی Comment
حالا در صفحه ی نمایش خبر چطور کامنت ها رو نمایش بدیم و فرم برای درج نظر قرار بدیم؟
public class News
{
public int NewsId{get;set;}
public string Title{get;set;}
public string Description{get;set;}
public string Content{get;set;}
public virtual Icollection<Comment> Comment{get;set;}
}
public class Comment
{
public int CommentId{get;set;}
public string Name{get;set;}
public string Email{get;set;}
public string Body{get;set;}
public int NewsId{get;set;}
public virtual News News{get;set;}
}
چطور میشه برای یک خبر یا مطلب کامنت گذاشت به صورت Ajax ؟
مثلا ما دو تا کلاس داریم یکی News و یکی Comment
حالا در صفحه ی نمایش خبر چطور کامنت ها رو نمایش بدیم و فرم برای درج نظر قرار بدیم؟
public class News
{
public int NewsId{get;set;}
public string Title{get;set;}
public string Description{get;set;}
public string Content{get;set;}
public virtual Icollection<Comment> Comment{get;set;}
}
public class Comment
{
public int CommentId{get;set;}
public string Name{get;set;}
public string Email{get;set;}
public string Body{get;set;}
public int NewsId{get;set;}
public virtual News News{get;set;}
}