public void UpdateCompetency(Competency competency) { var oldCompetency = GetCompetency(competency.Id); oldCompetency.Name = competency.Name; oldCompetency.Description = competency.Description; oldCompetency.Designation = competency.Designation; competencyRepo.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Competencies EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCompetencies(Competency competency) { base.AddObject("Competencies", competency); }
public static CompetencyModel FromDomainModel(Competency competency) { return new CompetencyModel { Id = competency.Id, Name = competency.Name, Description = competency.Description, Designation = competency.Designation }; }
/// <summary> /// Create a new Competency object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="objectInfo">Initial value of the ObjectInfo property.</param> /// <param name="designation">Initial value of the Designation property.</param> public static Competency CreateCompetency(global::System.Int32 id, global::System.String name, ObjectInfo objectInfo, global::System.String designation) { Competency competency = new Competency(); competency.Id = id; competency.Name = name; competency.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo"); competency.Designation = designation; return competency; }