Пример #1
0
        public Operator Execute(int id)
        {
            return(logic.Execute <Operator>((fac) =>
            {
                using (var u = fac.CreateUoW())
                {
                    return u.Execute <Operator>(() =>
                    {
                        var repo = u.GetSpecificRepo <OperatorRepo>();

                        return repo.GetById(id);
                    });
                }
            }));
        }
Пример #2
0
        public void Execute(Operator model)
        {
            logic.Execute((fac) =>
            {
                using (var u = fac.CreateUoW())
                {
                    u.Execute(() =>
                    {
                        var repo = u.GetSpecificRepo <OperatorRepo>();

                        repo.Update(model);
                    }, true);
                }
            });
        }