Beispiel #1
0
        public void UpdateTypeOfObject(TypeOfObject_Infra inst)
        {
            var tempInst = context.Types.FirstOrDefault(_ => _.Id == inst.Id);

            tempInst.Id = inst.Id;
            tempInst.TitleOfTypeOfObject       = inst.TitleOfTypeOfObject;
            tempInst.DescriptionOfTypeOfObject = inst.DescriptionOfTypeOfObject;
            context.SaveChanges();
        }
Beispiel #2
0
 public static TypeOfObject_Domain TypeOfObjectFromInfraToDomain(this TypeOfObject_Infra @this)
 {
     if (@this != null)
     {
         return(new TypeOfObject_Domain()
         {
             Id = @this.Id,
             TitleOfTypeOfObject = @this.TitleOfTypeOfObject,
             ImgSrc = @this.ImgSrc,
             DescriptionOfTypeOfObject = @this.DescriptionOfTypeOfObject
         });
     }
     else
     {
         return(null);
     }
 }
Beispiel #3
0
 public void CreateTypeOfObject(TypeOfObject_Infra inst)
 {
     context.Types.Add(inst);
     context.SaveChanges();
 }