Skip to content
Snippets Groups Projects

Product/483 organizations

Merged L. Ellenbeck requested to merge Product/483-organizations into Sprint/2020-07
5 files
+ 10
50
Compare changes
  • Side-by-side
  • Inline
Files
5
using Coscine.Database.Models;
using Coscine.Database.ReturnObjects;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace Coscine.Api.Project.Controllers
{
[Authorize]
public class InstituteController : Controller
{
private readonly InstituteModel _instituteModel;
public InstituteController()
{
_instituteModel = new InstituteModel();
}
[Route("[controller]")]
public IActionResult Index()
{
return Json(_instituteModel.GetAll()
.Select((institute) => new InstituteObject(institute.Id, institute.IKZ, institute.DisplayName)));
}
}
}
Loading