‫۹ سال و ۳ ماه قبل، دوشنبه ۸ تیر ۱۳۹۴، ساعت ۱۳:۵۹
سلام من این تایپیک‌ها رو بررسی کردم ولی نتونستم این فرایندها رو ادغام کنم ببینید من داخل همین پروژه شما دو تا مدل با نام‌های Category.cs وDataBaseContext.cs تعریف کردم و کد هاشم بصورت زیر است حالا چه جوری با تابع بازگشتی داخل HomeController بجای populatetree اظلاعات رو دریافت کنم در ضمن فیلدها هم طبق گفته خودتون باید مطابق jstree باشه که در مل‌ها تعریف کردم؟
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;

namespace MvcJSTree.Models.Entities
{
    public class Category
    {
        public Category()
        {

        }
        public Category(string id,string parentid,string orginialid,string text,string position,string href)
        {
            this.Id = id;
            this.ParentId = parentid;
            this.OriginalId = orginialid;
            this.Text = text;
            this.Position = position;
            this.Href = href;
        }
               
        public string Id { set; get; }
        public string ParentId { set; get; }
        public string OriginalId { set; get; }
        public string Text { set; get; }
        public string Position { set; get; }
        public string Href { set; get; }

        public override string ToString()
        {
            return string.Format("{0},{1},{2},{3},{4},{5}",this.Id,this.ParentId,this.OriginalId,this.Text,this.Position,this.Href);
        }      
    }
    
}

کد مربوط به DataBaseContext
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Data.Entity;

namespace MvcJSTree.Models
{
    public class DataBaseContext:System.Data.Entity.DbContext
    {
        public DataBaseContext()
        {

        }
         static DataBaseContext ()
        {

            System.Data.Entity.Database.SetInitializer(
                new System.Data.Entity.DropCreateDatabaseIfModelChanges<DataBaseContext>());

        }
        
         public System.Data.Entity.DbSet<DataBaseContext> Category { get; set; }
        
    }
}
‫۹ سال و ۳ ماه قبل، یکشنبه ۷ تیر ۱۳۹۴، ساعت ۱۵:۳۲
سلام؛ من میخوام با این کد اطلاعات را از بانکی که بصورت کد فرست ایجاد کردم بخونم چطور باید اینکار رو بکنم و نمی‌خوام اطلاعات رو از روت دریافت نکنه؟ اگر منبعی وجود دارد معرفی کنید.