public async Task <int> SaveStepPayPlanForm(StepPayPlanForm stepPayPlanForm) { using (IDbConnection conn = Connection) { string sQuery = "INSERT INTO StepPayPlan(name, title, department, review, sap, period, division, teamwork, integrity, innovation, professionalism)" + "VALUES(@name, @title, @department, @review, @sap, @period, @division, @teamwork, @integrity, @innovation, @professionalism)"; conn.Open(); var result = await conn.ExecuteAsync(sQuery, stepPayPlanForm); conn.Close(); return(result); } }
public async Task <IActionResult> SaveNewStepPayPlanForm([FromBody] StepPayPlanForm stepPayPlanForm) { var response = await _stepPayPlanFormRepository.SaveStepPayPlanForm(stepPayPlanForm); return(Json(response)); }