public void UpdateStage(Stage_Infra inst)
        {
            var tempInst = context.Stages.FirstOrDefault(_ => _.Id == inst.Id);

            tempInst.Id                 = inst.Id;
            tempInst.ImgSrc             = inst.ImgSrc;
            tempInst.DescriptionOfStage = inst.DescriptionOfStage;
            context.SaveChanges();
        }
Beispiel #2
0
 public static Stage_Domain StageFromInfraToDomain(this Stage_Infra @this)
 {
     if (@this != null)
     {
         return(new Stage_Domain()
         {
             Id = @this.Id,
             ImgSrc = @this.ImgSrc,
             DescriptionOfStage = @this.DescriptionOfStage
         });
     }
     else
     {
         return(null);
     }
 }
 public void CreateStage(Stage_Infra inst)
 {
     context.Stages.Add(inst);
     context.SaveChanges();
 }