Beispiel #1
0
        public async Task <ClientGroup> BizActionAsync(int inputData)
        {
            var clientGroup = await _dbAccess.FindAsync(inputData);

            if (clientGroup == null)
            {
                return(ReturnError <ClientGroup>(BusinessErrors.ClientGroups.GroupNotFound));
            }

            _dbAccess.Remove(clientGroup);
            return(clientGroup);
        }
Beispiel #2
0
        public async Task <ClientGroup> BizActionAsync(ClientGroupDto inputData)
        {
            var group = await _dbAccess.FindAsync(inputData.ClientGroupId);

            if (group == null)
            {
                return(ReturnError <ClientGroup>(BusinessErrors.ClientGroups.GroupNotFound));
            }

            group.Name = inputData.Name;
            return(group);
        }