public async Task <NetResult <AddUsersProjectResponse> > RemoveUsersProject([FromBody] AddUsersProject model) { try { }catch (Exception ext) { } return(null); }
public async Task <NetResult <AddUsersProjectResponse> > AddUsersProject([FromBody] AddUsersProject model) { var existProject = _myProjects.GetFirst(m => m.UserId == this.UserId <string>() && model.ProjectId == m.ProjectId); if (existProject == null) { return(StatusCore.BadRequest); } AddUsersProjectResponse result = await _myProjects.AddUsersProject(model, existProject); return(result); }
public async Task <AddUsersProjectResponse> AddUsersProject(AddUsersProject model, UserProjects addUserId) { List <UserProjects> list = new List <UserProjects>(); foreach (var i in model.UserIds) { var user = _user.Get(i); list.Add(AddProjectUser(user, addUserId)); } return(new AddUsersProjectResponse() { UserProjects = list }); }