Example #1
0
 public Library Create([FromBody] Library library)
 {
     if (ModelState.IsValid)
     {
         return(_repo.Create(library));
     }
     return(null);
 }
Example #2
0
        internal Library Create(Library newLibrary)
        {
            Library created = _repo.Create(newLibrary);

            if (created == null)
            {
                throw new Exception("Create request failed");
            }
            return(created);
        }
 internal object Create(Library newLibrary)
 {
     return(_repo.Create(newLibrary));
 }