public void DeleteOne(ArrangementBudgetDTO dto) { try { using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { session.Delete(dto); transaction.Commit(); } } catch (Exception) { throw new HibernateException("Error when deleting budget for " + dto.Artist); } }
public ArrangementBudget FromDTO(ArrangementBudgetDTO dto) { try { return(new ArrangementBudget { Id = dto.Id, Artist = dto.Artist, Date = dto.Date, ArtistFee = dto.ArtistFee, Status = dto.Status, BookerInCharge = dto.BookerInCharge }); } catch (Exception) { throw new Exception("Error when mapping arrangement budget dto to service model."); } }