public IActionResult Put(int id, [FromBody] keyvalueModel value) { ApplicationMaster _applicationMaster = new ApplicationMaster() { ApplicationId = value.Id, ApplicationName = value.keyValue, IsDeleted = false }; TicketDB.Entry(_applicationMaster).State = EntityState.Modified; return(Ok(TicketDB.SaveChanges())); }
public IActionResult Post([FromBody] keyvalueModel value) { var app = new ApplicationMaster() { ApplicationId = value.Id, ApplicationName = value.keyValue, IsDeleted = false }; TicketDB.ApplicationMaster.Add(app); TicketDB.SaveChanges(); TicketDB.Dispose(); return(CreatedAtAction(nameof(GetById), new { id = app.ApplicationId })); }