public JsonResult AddETOPlaybook(string ETOPlaybookName)
 {
     ETOPlaybook obj = new ETOPlaybook();
     obj.Name = ETOPlaybookName;
     obj.IsActive = true;
     obj.Created = DateTime.Now;
     _ETOPlaybook.Add(obj);
     int Id = _ETOPlaybook.GetTopETOPlaybookId();
     return Json(Id, JsonRequestBehavior.AllowGet);
 }
 public async Task<IHttpActionResult> Post(ETOPlaybook etoPlaybook)
 {
     if (!ModelState.IsValid)
     {
         return BadRequest(ModelState);
     }
     _context.ETOPlaybooks.Add(etoPlaybook);
     await _context.SaveChangesAsync();
     return Created(etoPlaybook);
 }
 public async Task<IHttpActionResult> Put([FromODataUri] int key, ETOPlaybook etoPlaybook)
 {
     if (!ModelState.IsValid)
     {
         return BadRequest(ModelState);
     }
     if (key != etoPlaybook.ID)
     {
         return BadRequest();
     }
     _context.Entry(etoPlaybook).State = EntityState.Modified;
     try
     {
         await _context.SaveChangesAsync();
     }
     catch (DbUpdateConcurrencyException)
     {
         //if (!ProductExists(key))
         //{
         //    return NotFound();
         //}
         //else
         //{
         throw;
         //}
     }
     return Updated(etoPlaybook);
 }