Exemple #1
0
        public static string CreateMember(Member MomberModel)
        {
            string ID = string.Empty;

            try
            {
                TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
                {
                    IsolationLevel = IsolationLevel.ReadCommitted
                });
                using (transaction)
                {
                    MemberDAL DAL = new MemberDAL();
                    ID = DAL.CreateMember(MomberModel);
                    transaction.Complete();
                }
            }
            catch (DbException dbexception)
            {
                throw new Exception("Exception while Inserting Data", dbexception);
            }

            catch (ArgumentException argumentException)
            {
                throw new Exception("Exception while Inserting Data", argumentException);
            }
            return(ID);
        }