// GET api/<controller> public LibraryResponse Get() { LibraryResponse response = new LibraryResponse(); response.Series = Library.Series().ToList(); return(response); }
// POST api/<controller> public LibraryResponse Post([FromBody] LibraryRequest request) { LibraryResponse response = new LibraryResponse(); if (request.Series != null) { foreach (var serie in request.Series) { Library.Add(serie); } this.Library.Commit(); } response.Series = Library.Series().ToList(); return(response); }