public static void editExpertise(ExpertiseDto expertiseDto) { Expertise expertise = AutoMapperConfiguration.mapper.Map <Expertise>(expertiseDto); using (placementDepartmentDBEntities placementDepartmentDB = new placementDepartmentDBEntities()) { placementDepartmentDB.Expertise.Attach(expertise); placementDepartmentDB.Entry(expertise).State = EntityState.Modified; placementDepartmentDB.SaveChanges(); } }
public static int NewExpertise(ExpertiseDto expertiseDto) { Expertise expertise = AutoMapperConfiguration.mapper.Map <Expertise>(expertiseDto); using (placementDepartmentDBEntities placementDepartmentDB = new placementDepartmentDBEntities()) { expertise = placementDepartmentDB.Expertise.Add(expertise); placementDepartmentDB.SaveChanges(); return(expertise.Id); } }
public void Put([FromBody] ExpertiseDto expertiseDto) { ExpertiseDtoManager.editDtoExpertise(expertiseDto); }
public int Post([FromBody] ExpertiseDto expertiseDto) { return(ExpertiseDtoManager.newDtoExpertise(expertiseDto)); }
public static void editDtoExpertise(ExpertiseDto expertiseDto) { ExpertiseManager.editExpertise(expertiseDto); }
public static int newDtoExpertise(ExpertiseDto expertiseDto) { return(ExpertiseManager.NewExpertise(expertiseDto)); }