public void UpdateRepareobject(Repareobject_Infra inst) { var tempInst = context.Repareobjects.FirstOrDefault(_ => _.Id == inst.Id); tempInst.Id = inst.Id; tempInst.AddressOfRepareobject = inst.AddressOfRepareobject; tempInst.TypeOfObject_InfraId = inst.TypeOfObject_InfraId; context.SaveChanges(); }
public static Repareobject_Domain RepareobjectFromInfraToDomain(this Repareobject_Infra @this) { if (@this != null) { return(new Repareobject_Domain() { Id = @this.Id, AddressOfRepareobject = @this.AddressOfRepareobject, TypeOfObject_DomainId = @this.TypeOfObject_InfraId }); } else { return(null); } }
public void CreateRepareobject(Repareobject_Infra inst) { context.Repareobjects.Add(inst); context.SaveChanges(); }