public JsonResult AssociateMembers([FromBody] IncomingExistingProjectMembers accounts) { using (var context = new UsersContext(Context, Configuration)) { context.AssociatedProjectExistingMembers(accounts); } return(Json(new IncomingExistingProjectMembers { })); }
public dynamic RequestAccess([FromBody] IncomingProjectAccount request) { dynamic cResult = new System.Dynamic.ExpandoObject(); using (var context = new UsersContext(Context, Configuration)) { var result = context.CheckProjectSignUpPolicy(request.ProjectId, string.Empty).Item1; if (result == true) { var getUserAccountByEmail = context.GetUserAccountByName(request.email); context.AssociatedProjectExistingMembers(new IncomingExistingProjectMembers { ProjectId = request.ProjectId, Accounts = new List <OutgoingUserAccounts> { new OutgoingUserAccounts { AccountId = getUserAccountByEmail.Id, ChatChannels = 1, EditUserRights = 0, IterationOptions = 0, ScheduleManagement = 0, ViewWorkItems = 1, WorkItemOption = 1, Documentation = 0 } } }); cResult.Success = true; return(cResult); } else { cResult.Error = true; return(cResult); } } }