I am new to c# and mvc and i'm trying to learn this stuff by myself. Can anybody help me please.
I created this two tables
public class TVListData
{
public string Message { get; set; }
public List Rows { get; set; }
public string Status { get; set; }
}
public class ListElement
{
public string Description { get; set; }
public string Id { get; set; }
}
public List GetErrorCodes()
{
return GetList("get_error_code_list");
}
public List GetWarranties()
{
return GetList("get_warranty_list");
}
private List GetList(string listData)
{
foreach ()// I want to iterate through but i'm not sure what to iterate here
{
//i'm not sure of what to do here
}
return new RTCListData
{
//i can do object initialization here
};
Thanks,
tola

Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 4, 2014, 9:18 PM EDT
tola Ibironke8 reputationPosted Sep 5, 2014, 4:37 AM EDT
Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 5, 2014, 4:58 AM EDT
private List
{
//return all TVListData
}
private List
{
//Somehting liek below will go here
var res = from p in GetAllTVList() where p.Message = code select p
}
tola Ibironke8 reputationPosted Sep 5, 2014, 6:47 AM EDT
foreach(var mylist in GetList(listData)) //i'm not sure if this is correct )
{
//what can I do here
description = ......
id = .......
}
return new TVListData
{
message =
id=
status =
rows =
}
this is my learning pain. Any help is highly appreciated.