示例#1
0
        public override void Create(BllTemplate entity)
        {
            ControlMethodsLibService controlMethodsLibService = new ControlMethodsLibService(uow);
            var controlMethodsLib = controlMethodsLibService.Create(entity.ControlMethodsLib, true);

            entity.ControlMethodsLib = controlMethodsLib;
            uow.Templates.Create(mapper.MapToDal(entity));
            uow.Commit();
        }
        public new BllJournal Create(BllJournal entity)
        {
            ControlMethodsLibService controlMethodsLibService = new ControlMethodsLibService(uow);

            entity.ControlMethodsLib = controlMethodsLibService.Create(entity.ControlMethodsLib, false);
            DalJournal dalEntity = mapper.MapToDal(entity);
            Journal    ormEntity = uow.Journals.Create(dalEntity);

            uow.Commit();
            entity.Id = ormEntity.id;
            return(entity);
        }