public bool Delete(CustomerDomain entity) { try { this.Delete<CustomerDomain>(entity); return true; } catch (Exception) { return false; } }
public bool Insert(CustomerDomain entity) { using( var session = SessionFactory.OpenStatelessSession()) using( var tx = session.BeginTransaction()) { try { var obj = session.Insert(entity); return true; } catch (Exception ex) { tx.Rollback(); Logger.Error(ex); //return throw; } } }
public bool UpdateWithId(CustomerDomain entity) { try { this.Update<CustomerDomain>(entity); return true; } catch (Exception ex) { return false; } }