public async Task <IPagedResult <IFeatureModel> > Get([FromQuery] FeaturesFilter filter) { using (_context.Scope()) { return(await _featuresDataProvider.Get(HttpContext.User.GetUserId()).GetPagedResultAsync(filter)); } }
public async Task <Permission[]> Get(int userId, int projectId) { using (_context.Scope()) { return(await _permissionsDataProvider.Get(userId, projectId).ToArrayAsync()); } }
public async Task <IPagedResult <IProject> > Get([FromQuery] ProjectsFilter filter) { using (_context.Scope()) { return(await _projectsDataProvider.Get(HttpContext.User.GetUserId()).GetPagedResultAsync(filter)); } }
public async Task Add([FromBody] UserInfoModel userModel) { using (_context.Scope()) { await _usersDataProvider.AddAsync(userModel); } }
public override async Task OnConnectedAsync() { using (_connectionContext.Scope()) { await _usersDataProvider.Add(Context.User.GetUserId(), Context.ConnectionId); } await base.OnConnectedAsync(); }
public async Task <object> Authenticate([FromBody] LoginModel model) { using (_context.Scope()) { return(new { Token = await _loginDataProvider.AuthenticateAsync(model.Username, model.Password) }); } }
public async Task <IPagedResult <ITask> > Get([FromQuery] TaskFilter filter) { using (_context.Scope()) { return(await _taskDataProvider.GetLiveTasks(HttpContext.User.GetUserId(), filter.ProjectId).GetPagedResultAsync(filter)); } }
private void ExecuteScope(ScopeType type, bool isInTransactionScope) { if (type == ScopeType.Event) { _connectionContext.EventScope(); return; } if (isInTransactionScope) { _connectionContext.TransactionScope(); } else { _connectionContext.Scope(); } }