public void AddNew(Caddy c) { utOfWork.CaddyRepository.Add(c); utOfWork.Commit(); }
// POST: odata/Caddies public IHttpActionResult Post(Caddy caddy) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.Caddy.Add(caddy); db.SaveChanges(); return Created(caddy); }