public void UpdateMission(Mission mission)
 {
     using (var ctx = new WarframeResDemoContext())
     {
         ctx.Missions.Attach(mission);
         ctx.Entry(mission).State = EntityState.Modified;
         ctx.SaveChanges();
     }
 }
 public void UpdateFraction(Fraction fraction)
 {
     using (var ctx = new WarframeResDemoContext())
     {
         ctx.Fractions.Attach(fraction);
         ctx.Entry(fraction).State = EntityState.Modified;
         ctx.SaveChanges();
     }
 }
 public void UpdatePlanet(Planet planet)
 {
     using (var ctx = new WarframeResDemoContext())
     {
         ctx.Planets.Attach(planet);
         ctx.Entry(planet).State = EntityState.Modified;
         ctx.SaveChanges();
     }
 }
 public void UpdateResource(Resource resource)
 {
     using (var ctx = new WarframeResDemoContext())
     {
         ctx.Resources.Attach(resource);
         ctx.Entry(resource).State = EntityState.Modified;
         ctx.SaveChanges();
     }
 }
Example #5
0
 public void UpdateFraction(MissionType type)
 {
     using (var ctx = new WarframeResDemoContext())
     {
         ctx.MissionTypes.Attach(type);
         ctx.Entry(type).State = EntityState.Modified;
         ctx.SaveChanges();
     }
 }