Beispiel #1
0
 // POST api/values
 public IHttpActionResult Post(Toy toy)
 {
     if (toy == null)
     {
         return(BadRequest());
     }
     return(Ok(repository.Add(toy)));
 }
 public String CreateToy(ToyWcf toyWcf)
 {
     if (toyWcf == null)
     {
         throw new ArgumentNullException("Toy");
     }
     repository.Add(InverseMap(toyWcf));
     return(toyWcf.Name);
 }