public ItemService(IItemRepository ItemRepository, IItemTagRepository ItemTagRepository, ITagRepository _tagRepository, IUniOfWork unitOfWork) { this._ItemRepository = ItemRepository; this._ItemTagRepository = ItemTagRepository; this._tagRepository = _tagRepository; this._unitOfWork = unitOfWork; }
public ApplicationGroupService(IUniOfWork unitOfWork, IApplicationUserGroupRepository appUserGroupRepository, IApplicationGroupRepository appGroupRepository) { this._appGroupRepository = appGroupRepository; this._appUserGroupRepository = appUserGroupRepository; this._unitOfWork = unitOfWork; }
public Order Post([FromServices] ICustomerRepository customerRepository, [FromServices] IOrderRepository orderRepository, [FromServices] IUniOfWork unityOfWork) { try { var customer = new Customer { Name = "Fernando Henrique Leme" }; var order = new Order { Number = "123", Customer = customer }; customerRepository.Save(customer); orderRepository.Save(order); unityOfWork.Commit(); return(order); } catch { unityOfWork.Rollback(); return(null); } }
//constructor cua Service public PostService(IPostRepository postRepository, IUniOfWork unitOfWork) { this._postRepository = postRepository; this._unitOfWork = unitOfWork; }
public ProductService(IUniOfWork uniOfWork) { _uniOfWork = uniOfWork; }
public ErrorService(IErrorRepository errorRepository, IUniOfWork unitOfWork) { this._errorRepository = errorRepository; this._UnitOfWork = unitOfWork; }
public ProductCategoryService(IProductCategoryRepository ProductCategoryRepository, IUniOfWork unitOfWork) { this._ProductCategoryRepository = ProductCategoryRepository; this._unitOfWork = unitOfWork; }