예제 #1
0
        /// <summary>
        /// Deletes the record from the database
        /// </summary>
        /// <param name="record"></param>
        public virtual void DeleteRecord(T record)
        {
            if (record == null)
            {
                return;
            }

            var dbObj = GetDbRecordByID(record.ID, throwExceptionIfNotFound: false);

            if (dbObj != null)
            {
                Records.DeleteOnSubmit(dbObj);
                Records.Context.SubmitChanges();
            }
        }