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);
        }
Esempio n. 2
0
 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
     });
 }
Esempio n. 4
0
 public async Task DeleteAsync(ProductPermissionGroup data, string operatorId)
 {
     if (data == null)
     {
         return;
     }
     _context.Set <ProductPermissionGroup>().Remove(data);
     await _context.SaveEntitiesAsync(false);
 }
Esempio n. 5
0
 public async Task UpdateAsync(ProductPermissionGroup entity)
 {
     _context.Set <ProductPermissionGroup>().Update(entity);
     await _context.SaveEntitiesAsync();
 }
Esempio n. 6
0
 protected EntityEntry <ProductPermissionGroup> Entry(ProductPermissionGroup entity)
 {
     return(_context.Entry(entity));
 }