public List<CiRegistroUploadConfirmationModel> CommitBulkUpsertUploaded(long session) { List<CiRegistroUploadConfirmationModel> confirmation = new List<CiRegistroUploadConfirmationModel>(); try { using (var entity = new db_SeguimientoProtocolo_r2Entities()) { List<spCommitBulkUpsertCiRegistroUploaded_Result> res = entity.spCommitBulkUpsertCiRegistroUploaded(session).ToList(); if (res != null && res.Count > 0) { res.ForEach(o => { confirmation.Add(new CiRegistroUploadConfirmationModel() { IdRegistro=Int64.Parse( o.FechaNumerica.ToString()+o.IdPuntoMedicion.ToString() ), IdPuntoMedicion = o.IdPuntoMedicion, FechaNumerica = (long)o.FechaNumerica, LMD = o.LastModifiedDate, SLMD = (long)o.ServerLastModifiedDate }); }); } } } catch (Exception) { throw; } return confirmation; }