public async Task <IActionResult> Update(DesignationInformation designationInformation) { try { var designation = await _repository.Update(designationInformation); return(Ok(designation)); } catch (Exception) { throw; } }
public async Task <IActionResult> GetById(DesignationInformation designationInformation) { try { var designation = await _repository.GetById(designationInformation.Id); return(Ok(designation)); } catch (Exception) { throw; } }
public async Task <DesignationInformation> Insert(DesignationInformation designationInformation) { try { _context.DesignationInformations.Add(designationInformation); await _context.SaveChangesAsync(); return(designationInformation); } catch (Exception) { throw; } }
public async Task <DesignationInformation> Update(DesignationInformation designationInformation) { try { var designation = _context.DesignationInformations.Attach(designationInformation); designation.State = EntityState.Modified; await _context.SaveChangesAsync(); return(designationInformation); } catch (Exception) { throw; } }