public void Delete(UserBasedProxy basedProxy) { var foundUser = ModelDatabase.GetUser(basedProxy); ModelDatabase.Users.Remove(foundUser); ModelDatabase.SaveChanges(); }
public void Edit(UserExtendedProxy oldExtendedProxy, UserExtendedProxy newExtendedProxy) { var foundUser = ModelDatabase.GetUser(oldExtendedProxy); foundUser.Login = newExtendedProxy.Login; foundUser.Password = newExtendedProxy.Password; foundUser.AccessType = newExtendedProxy.AccessType; ModelDatabase.SaveChanges(); }
public void Edit(Guid oldTableId, User newTable) { var user = ModelDatabase.GetUser(oldTableId); user.Login = newTable.Login; user.Password = newTable.Password; user.AccessType = newTable.AccessType; ModelDatabase.SaveChanges(); }
public void Edit(UserId oldUserId, User newUser) { var user = ModelDatabase.GetUser(oldUserId); user.Login = newUser.Login; user.Password = newUser.Password; user.AccessType = newUser.AccessType; ModelDatabase.SaveChanges(); }
public void Add(Comment table) { ModelDatabase.Comments.Add(new CommentEntity { CommentId = Guid.NewGuid(), Content = table.Content, CreateDateTime = DateTime.Now, UserId = ModelDatabase.GetUser(table.UserId).UserId, TaskId = ModelDatabase.GetTask(table.TaskId).TaskId }); ModelDatabase.SaveChanges(); }
public void Add(Comment comment) { AddSpaceForCommentIndex(comment.Index); ModelDatabase.Comments.Add(new CommentEntity { Id = Guid.NewGuid(), Index = comment.Index, Content = comment.Content, CreateDateTime = DateTime.Now, UserId = ModelDatabase.GetUser(comment.UserId).Id, TaskId = ModelDatabase.GetTask(comment.TaskId).Id }); ModelDatabase.SaveChanges(); }
public void Edit(Guid oldTableId, Task newTable) { var task = ModelDatabase.GetTask(oldTableId); task.Header = newTable.Header; task.Description = newTable.Description; task.Branch = string.IsNullOrEmpty(newTable.Branch) ? "-" : newTable.Branch; task.State = newTable.State; task.Priority = newTable.Priority; task.DeveloperId = ModelDatabase.GetUser(newTable.DeveloperId)?.UserId; task.ReviewerId = ModelDatabase.GetUser(newTable.ReviewerId)?.UserId; task.ColumnId = ModelDatabase.GetColumn(newTable.ColumnId)?.ColumnId; ModelDatabase.SaveChanges(); }
public void Add(Task table) { ModelDatabase.Tasks.Add(new TaskEntity { TaskId = Guid.NewGuid(), Header = table.Header, Description = table.Description, Branch = string.IsNullOrEmpty(table.Branch) ? "-" : table.Branch, State = table.State, Priority = table.Priority, CreateDateTime = DateTime.Now, DeveloperId = ModelDatabase.GetUser(table.DeveloperId)?.UserId, ReviewerId = ModelDatabase.GetUser(table.ReviewerId)?.UserId, ColumnId = ModelDatabase.GetColumn(table.ColumnId)?.ColumnId, BoardId = ModelDatabase.GetBoard(table.BoardId).BoardId }); ModelDatabase.SaveChanges(); }
public void Edit(TaskId oldTaskId, Task newTask) { var task = ModelDatabase.GetTask(oldTaskId); RemoveSpaceForTaskIndex(task.Index); AddSpaceForTaskIndex(newTask.Index); task.Index = newTask.Index; task.Header = newTask.Header; task.Description = newTask.Description; task.Branch = string.IsNullOrEmpty(newTask.Branch) ? "-" : newTask.Branch; task.State = newTask.State; task.Priority = newTask.Priority; task.DeveloperId = ModelDatabase.GetUser(newTask.DeveloperId)?.Id; task.ReviewerId = ModelDatabase.GetUser(newTask.ReviewerId)?.Id; task.ColumnId = ModelDatabase.GetColumn(newTask.ColumnId)?.Id; ModelDatabase.SaveChanges(); }
public void Add(Task task) { AddSpaceForTaskIndex(task.Index); ModelDatabase.Tasks.Add(new TaskEntity { Id = Guid.NewGuid(), Index = task.Index, Header = task.Header, Description = task.Description, Branch = string.IsNullOrEmpty(task.Branch) ? "-" : task.Branch, State = task.State, Priority = task.Priority, CreateDateTime = DateTime.Now, DeveloperId = ModelDatabase.GetUser(task.DeveloperId)?.Id, ReviewerId = ModelDatabase.GetUser(task.ReviewerId)?.Id, ColumnId = ModelDatabase.GetColumn(task.ColumnId)?.Id, BoardId = ModelDatabase.GetBoard(task.BoardId).Id }); ModelDatabase.SaveChanges(); }
public User GetById(UserId id) { return(ModelDatabase.GetUser(id).ToTable()); }
public UserExtendedProxy GetExtendedProxy(UserBasedProxy basedProxy) { return(modelDatabase.GetUser(basedProxy).ToExtendedProxy()); }
public User GetById(Guid id) { return(ModelDatabase.GetUser(id).ToTableAsAdmin()); }