Exemplo n.º 1
0
 public void UpdateCompetency(Competency competency)
 {
     var oldCompetency = GetCompetency(competency.Id);
     oldCompetency.Name = competency.Name;
     oldCompetency.Description = competency.Description;
     oldCompetency.Designation = competency.Designation;
     competencyRepo.SaveChanges();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Competencies EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCompetencies(Competency competency)
 {
     base.AddObject("Competencies", competency);
 }
Exemplo n.º 3
0
 public static CompetencyModel FromDomainModel(Competency competency)
 {
     return new CompetencyModel {
         Id = competency.Id,
         Name = competency.Name,
         Description = competency.Description,
         Designation = competency.Designation
     };
 }
Exemplo n.º 4
0
 /// <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;
 }