Skip to content

Instantly share code, notes, and snippets.

@thePunderWoman
Created January 24, 2013 21:45
Show Gist options
  • Save thePunderWoman/4628151 to your computer and use it in GitHub Desktop.
Save thePunderWoman/4628151 to your computer and use it in GitHub Desktop.
insert testing
vcdb_VehiclePart vp = new vcdb_VehiclePart();
try {
vp = db.vcdb_VehicleParts.Where(x => x.VehicleID.Equals(vehicle.ID) && x.PartNumber.Equals(vpart.partID)).First();
} catch {
vp = new vcdb_VehiclePart {
PartNumber = vpart.partID,
VehicleID = vehicle.ID
};
db.vcdb_VehicleParts.InsertOnSubmit(vp);
db.SubmitChanges();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment