public Snapshot_AquisitionLocationCode SaveAquisitionLocationCode(Snapshot_AquisitionLocationCode snapshotLabel) { using (var context = new DataContext()) { context.Snapshot_AquisitionLocationCodes.Add(snapshotLabel); context.SaveChanges(); return(snapshotLabel); } }
private List <Snapshot_AquisitionLocationCode> CastToSnapshotAquisitionLocationCode(List <string> aquisitionLocationCodes, int workTrackId) { var snapshotList = new List <Snapshot_AquisitionLocationCode>(); if (aquisitionLocationCodes != null) { foreach (var code in aquisitionLocationCodes) { var snapshot = new Snapshot_AquisitionLocationCode(); snapshot.CloneWorksTrackId = workTrackId; snapshot.AquisitionLocationCode = code; snapshotList.Add(snapshot); } } return(snapshotList); }