public Result FromDTO(ResultDTO dto) { return new Result { Id = dto.Id, Period = ((ResultPeriod)dto.Period).ToString(), Year = dto.Year, Comment = dto.Comment, UsedBudget = ((BudgetType)dto.UsedBudget).ToString() }; }
public void SaveNewOverview(ResultDTO resultDTO) { using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(resultDTO); transaction.Commit(); } }