/// <summary>
 /// Updates the ec data.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="ecData">The ec data.</param>
 public void updateECData(DBConnection_EF conn, AECDATAMAP ecData)
 {
     try
     {
         conn.SaveChanges();
     }
     catch (Exception ex)
     {
         logger.Warn(ex);
         throw;
     }
 }
 /// <summary>
 /// Inserts the ec data.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="ecData">The ec data.</param>
 public void insertECData(DBConnection_EF conn, AECDATAMAP ecData)
 {
     try
     {
         conn.AECDATAMAP.Add(ecData);
         conn.SaveChanges();
     }
     catch (Exception ex)
     {
         logger.Warn(ex);
         throw;
     }
 }
        /// <summary>
        /// Gets the by ecid.
        /// </summary>
        /// <param name="conn">The connection.</param>
        /// <param name="readLock">if set to <c>true</c> [read lock].</param>
        /// <param name="ecid">The ecid.</param>
        /// <returns>ECDataMap.</returns>
        public AECDATAMAP getByECID(DBConnection_EF conn, bool readLock, string ecid)
        {
            AECDATAMAP rtnItem = null;

            try
            {
                var query = from ecData in conn.AECDATAMAP
                            where ecData.ECID == ecid.Trim()
                            select ecData;
                rtnItem = query.SingleOrDefault();
            }
            catch (Exception ex)
            {
                logger.Warn(ex);
                throw;
            }
            return(rtnItem);
        }