This is my api in json format
[{"tu_id":1,"tu_name":"Akhil","tu_usrname":"Akhl","tu_pwd":"1234","tu_cntno":"423433"}]
I want ID instead of tu_id
and Name instead of tu_name
this is my code in controller
public IEnumerable<TestUser> Get()
{
DataTable dt = new DataTable();
TestUserBL userbl = new TestUserBL();
dt = userbl.TestUserSel();
var user = dt.AsEnumerable().Select(x => new TestUser
{
tu_id = x.Field<int>("tu_id"),
tu_name = x.Field<string>("tu_name"),
tu_usrname=x.Field<string>("tu_usrname"),
tu_pwd=x.Field<string>("tu_pwd"),
tu_cntno=x.Field<string>("tu_cntno")
// like wise initialize properties here
});
return user;
}
Here I cant change tu_id
?