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
tola IbironkePosted Sep 5, 2014, 10:47 AM
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.
Nitesh KejriwalPosted Sep 5, 2014, 8:58 AM
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 IbironkePosted Sep 5, 2014, 8:37 AM
Nitesh KejriwalPosted Sep 5, 2014, 1:18 AM