internal void RemoveUserFromProject(IncomingRemoveUserFromProject userProject)
        {
            var userAccount = Context.AssociatedProjectMembers.FirstOrDefault(x => x.ProjectId == userProject.ProjectId && x.UserAccountId == userProject.UserId);

            Context.Attach(userAccount);
            Context.Remove(userAccount);
            Context.SaveChanges();
        }
Esempio n. 2
0
 public bool RemoveUserFromProject([FromBody] IncomingRemoveUserFromProject userProject)
 {
     using (var context = new DatabaseController(Context, Configuration))
     {
         context.RemoveUserFromProject(userProject);
     }
     return(true);
 }