public async Task <int> SaveUpdateSPEducation(SPEducation item) { if (item.Id == 0) { _context.SPEducations.Add(item); } else { _context.SPEducations.Update(item); } return(await _context.SaveChangesAsync()); }
public async Task <IActionResult> AddUpdateItem([FromBody] SPEducation item) { var result = await this._spEducationService.SaveUpdateSPEducation(item); return(Ok(result)); }