コード例 #1
0
 public async Task <ActionResult <EntitiesResponse <Unit> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments args)
 {
     return(await ControllerUtilities.InvokeActionImpl(async() =>
     {
         var serverTime = DateTimeOffset.UtcNow;
         var(data, extras) = await _service.Activate(ids: ids, args);
         var response = TransformToEntitiesResponse(data, extras, serverTime, cancellation: default);
         return Ok(response);
     },
                                                       _logger));
 }
コード例 #2
0
        public async Task <ActionResult <EntitiesResponse <ResponsibilityCenter> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments args)
        {
            bool returnEntities = args.ReturnEntities ?? false;

            return(await ControllerUtilities.InvokeActionImpl(() =>
                                                              Activate(ids : ids,
                                                                       returnEntities : returnEntities,
                                                                       expand : args.Expand,
                                                                       isActive : true)
                                                              , _logger));
        }
コード例 #3
0
        public async Task <ActionResult <EntitiesResponse <AccountClassification> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments args)
        {
            var serverTime = DateTimeOffset.UtcNow;
            var result     = await _service.Activate(ids : ids, args);

            var response = TransformToEntitiesResponse(result, serverTime, cancellation: default);

            return(Ok(response));
        }
コード例 #4
0
 public async Task <ActionResult <EntitiesResponse <LocalUser> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments <int> args)
 {
     return(await CallAndHandleErrorsAsync(() =>
                                           ActivateDeactivate(ids, args.ReturnEntities ?? false, args.Expand, isActive : true)
                                           ));
 }
コード例 #5
0
ファイル: RolesController.cs プロジェクト: crazyants/BSharp
 public async Task <ActionResult <EntitiesResponse <Role> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments <int> args)
 {
     return(await ControllerUtilities.ExecuteAndHandleErrorsAsync(() =>
                                                                  ActivateDeactivate(ids, args.ReturnEntities ?? false, args.Expand, isActive : true)
                                                                  , _logger));
 }
コード例 #6
0
        public async Task <ActionResult <EntitiesResponse <LegacyClassification> > > Activate([FromBody] List <int> ids, [FromQuery] ActivateArguments args)
        {
            bool returnEntities = args.ReturnEntities ?? false;

            return(await ControllerUtilities.InvokeActionImpl(() =>
                                                              Activate(ids : ids,
                                                                       returnEntities : returnEntities,
                                                                       expand : args.Expand,
                                                                       isDeprecated : false)
                                                              , _logger));
        }