public int AddStandartSize(IStandartSize aStandartSize) { var entity = new StandartSizeEntity { Diameter = aStandartSize.GetDiameter() }; using (var session = NHibernateHelper.OpenSession()) { using (var transaction = session.BeginTransaction()) { session.Save(entity); transaction.Commit(); } } return entity.Id; }
public int AddStandartSize(IStandartSize aStandartSize) { var entity = new StandartSizeEntity { Height = aStandartSize.GetHeight(), Width = aStandartSize.GetWidth(), Length = aStandartSize.GetLength() }; using (var session = NHibernateHelper.OpenSession()) { using (var transaction = session.BeginTransaction()) { session.Save(entity); transaction.Commit(); } } return entity.Id; }