Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

dotnet.com

[ApiController]
public class PeopleController : ControllerBase 
{ 
    [HttpGet("people/all")] 
    public ActionResult<IEnumerable<Person>> GetAll()
    {
        return new []
        {
            new Person { Name = "Ana" },
            new Person { Name = "Felipe" },
            new Person { Name = "Emillia" }
        };
    }
}

public class Person
{
    public string Name { get; set; }
}
Comment

dotnet.com

curl https://localhost:5001/people/all

[{"name":"Ana"},{"name":"Felipe"},{"name":"Emillia"}]
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to make infinite loop in c# 
Csharp :: unity async await 
Csharp :: Prime number Upto n 
Csharp :: c# reflection 
Csharp :: is it possible to be palindrome 
Csharp :: randon C# 
Csharp :: call ienumerator unity 
Csharp :: c# datagridview filter 
Csharp :: unity NetworkBehaviour the type or namespace could not be found 
Csharp :: Insertion sort in c# 
Csharp :: euler angles to quaternion unity 
Csharp :: c# form 
Csharp :: InverseTransformDirection 
Csharp :: what does - in f#? 
Csharp :: how do i repeat a button on visual studio code 
Csharp :: xamarin 12 hrs time format tt 
Csharp :: export2excel with logo and header and many table on one click stackoverflow 
Html :: open page with html 
Html :: bootstrap text bold 
Html :: how to make a whatsapp hyperlink html 
Html :: how to specify amout of letters in inputfield in css 
Html :: jquery $ is not defined 
Html :: target _blank 
Html :: prevent copying text in html 
Html :: html email links 
Html :: iframe adjust pdf zoom 
Html :: css textarea limit 
Html :: fullpage js cdn 
Html :: html ö 
Html :: html canvas clear shadow 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =