User-1722422105 posted
Hi all
i have class like
public class shopingmall
{
public List<shop_mall> smdata { get; set; }
}
public class shop_mall
{
public int sm_id { get; set; }
public string sm_name { get; set; }
public string sm_add { get; set; }
public DateTime sm_opentime { get; set; }
public DateTime sm_closetime { get; set; }
public string sm_sm_desc { get; set; }
}
}
i am geting the shopingmall objmodel values from web api function like
public void Index()
{
testEntities objdemoentity = new testEntities();
var studentercord = objdemoentity.sp_shopingmalldetails().ToList();
shopingmall objmodel = new shopingmall();
objmodel.smdata = new List<shop_mall>();
objmodel.smdata = new List<shop_mall>();
foreach (var item in studentercord.ToList())
{
objmodel.smdata.Add(new shop_mall { sm_name = item.sm_name, sm_add = item.sm_name });
}
}
what is return type for geting the values