public async Task <string> Handle(ProductPermissionGroupCreateCommand request, CancellationToken cancellationToken) { var group = new ProductPermissionGroup(request.Name, request.Description, identityService.GetOrganizationId()); await productPermissionGroupRepository.AddAsync(group); return(group.Id); }
public async Task LoadOwnProductItemsAsync(ProductPermissionGroup entity) { if (entity == null) { return; } await Entry(entity).Collection(x => x.OwnProductItems).LoadAsync(); }
public static ProductPermissionGroupIdentityQueryDTO From(ProductPermissionGroup data) { return(new ProductPermissionGroupIdentityQueryDTO { Id = data.Id, Name = data.Name, Description = data.Description }); }
public async Task DeleteAsync(ProductPermissionGroup data, string operatorId) { if (data == null) { return; } _context.Set <ProductPermissionGroup>().Remove(data); await _context.SaveEntitiesAsync(false); }
public async Task UpdateAsync(ProductPermissionGroup entity) { _context.Set <ProductPermissionGroup>().Update(entity); await _context.SaveEntitiesAsync(); }
protected EntityEntry <ProductPermissionGroup> Entry(ProductPermissionGroup entity) { return(_context.Entry(entity)); }