Click here to Skip to main content
15,885,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public class ValuesController : ApiController
{
    EIPEntities1 reterive = new EIPEntities1();
    // GET api/values
    public IEnumerable<eipentities1> Get()
    {
        //return new string[] { "value1", "value2" };
        return reterive;
    }

    // GET api/values/5
    public string Get(int id)
    {

        return "Value";
    }

    // POST api/values
    public void Post([FromBody]string value)
    {
    }

    // PUT api/values/5
    public void Put(int id, [FromBody]string value)
    {
    }

    // DELETE api/values/5
    public void Delete(int id)
    {
    }
}

View:
HTML
<table style="margin-removed 25%; margin-removed 10px; border: 2px solid LightGray;">

 <tr>

 <th>Currency_Code</th>
  <th>Description</th>

   @* <th>Appointment</th>

     <th>Technology</th>

     <th>Task</th>*@

  </tr>

@foreach (var item in Model.Currencies)
{
   <tr>
        <td>@item.Currency_Code</td>

         <td>@item.Description</td>
  
    </tr>
}

</table>
Posted
Updated 17-Nov-15 22:55pm
v3
Comments
Krunal Rohit 18-Nov-15 4:46am    
Format your code properly and elaborate your question more.

-KR
Sathish km 18-Nov-15 4:56am    
I formatted now
Suvendu Shekhar Giri 18-Nov-15 5:06am    
add clear description about your problem too.
Krunal Rohit 18-Nov-15 5:21am    
You want the foreach loop values in ApiController ?

-KR
Sathish km 18-Nov-15 6:48am    
anything...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900