Hi,
is there a simple way to have, from Code First Model like:
public class Person
{
[Key]
public string FirstName { get; set; }
[Key]
public string LastName { get; set; }
public int Age { get; set; }
}
the scaffolded Controllers like in your Sample?:
[EnableQuery]
public Person Get([FromODataUri] string firstName, [FromODataUri] string lastName)
{
Person person = _repo.Get(firstName, lastName);
if (person == null)
{
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
}
return person;
}
Easy on small amount of entities... but large models... uhhh.
Hi, is there a simple way to have, from Code First Model like:
the scaffolded Controllers like in your Sample?:
Easy on small amount of entities... but large models... uhhh.
https://github.com/OData/ODataSamples/tree/master/WebApi/v4/ODataCompositeKeySample
Kind regards.