Example #1
0
 //
 //  Insert a Person
 //
 public int InsertPerson(Person val)
 {
     try
     {
         using (var c = new Connect())
         {
             c.BeginTrx(IsolationLevel.ReadCommitted);
             var personDoa = new PersonDataMapper(c.GetConnection());
             personDoa.SetTransaction(c.Transaction);
             int result = personDoa.Insert(val);
             c.Commit();
             return(result);
         }
     }
     catch (Exception exception)
     {
         throw new FaultException <ServerError>(new ServerError());
     }
 }
Example #2
0
 //
 //  Insert a Person
 //
 public int InsertPerson(Person val)
 {
     try
     {
         using (var c = new Connect())
         {
             c.BeginTrx(IsolationLevel.ReadCommitted);
             var personDoa = new PersonDataMapper(c.GetConnection());
             personDoa.SetTransaction(c.Transaction);
             int result = personDoa.Insert(val);
             c.Commit();
             return result;
         }
     }
     catch (Exception exception)
     {
         throw new FaultException<ServerError>(new ServerError());
     }
 }