Exemplo n.º 1
0
        public async Task SaveMboRuleAsync(MboRule mboRule)
        {
            using (ISession session = SessionFactory.OpenSession())
                using (ITransaction transaction = session.BeginTransaction())
                {
                    await session.SaveOrUpdateAsync(mboRule);

                    transaction.Commit();
                }
        }
Exemplo n.º 2
0
        public async Task <MboRuleBackendDTO> CreateAndSaveMboRule(int idBusinessLevel, byte maxKpis, short year)
        {
            var mboRule = MboRule.Create(idBusinessLevel, maxKpis, year);

            await _repository.SaveMboRuleAsync(mboRule);

            return(new MboRuleBackendDTO()
            {
                Id = mboRule.Id, MaxKpis = mboRule.MaxKpis, Year = mboRule.Year
            });
        }