public void Delete(RecoveryIntervalsDTO entity) { var item = new RecoveryInterval { HOLEID = entity.HOLEID, PROJECTCODE = entity.PROJECTCODE, GEOLFROM = entity.GEOLFROM, GEOLTO = entity.GEOLTO, PRIORITY = entity.PRIORITY, Recovery_m = entity.Recovery_m, RecovGeo = entity.RecovGeo, RecovGeoDate = entity.RecovGeoDate, CoreLength = entity.CoreLength, RecoveryRatio = entity.RecoveryRatio, ID = entity.ID }; dbSet.Remove(item); }
public void Put(RecoveryIntervalsDTO entity) { var item = new RecoveryInterval { HOLEID = entity.HOLEID, PROJECTCODE = entity.PROJECTCODE, GEOLFROM = entity.GEOLFROM, GEOLTO = entity.GEOLTO, PRIORITY = entity.PRIORITY, Recovery_m = entity.Recovery_m, RecovGeo = entity.RecovGeo, RecovGeoDate = entity.RecovGeoDate, CoreLength = entity.CoreLength, RecoveryRatio = entity.RecoveryRatio, ID = entity.ID }; context.Entry(item).State = EntityState.Modified; }
public void UpdateAll(IList <RecoveryIntervalsDTO> entity) { foreach (var item in entity) { var interval = new RecoveryInterval { HOLEID = item.HOLEID, PROJECTCODE = item.PROJECTCODE, GEOLFROM = item.GEOLFROM, GEOLTO = item.GEOLTO, PRIORITY = item.PRIORITY, Recovery_m = item.Recovery_m, RecovGeo = item.RecovGeo, RecovGeoDate = item.RecovGeoDate, CoreLength = item.CoreLength, RecoveryRatio = item.RecoveryRatio, ID = item.ID }; dbSet.Attach(interval); context.Entry(interval).State = EntityState.Modified; } }