public bool UpdateUserBoard(UserBoardsDto userBoard)
 {
     using (var db = GetConnection())
     {
         db.Open();
         var result = db.Execute(@"Update UserBoard
                                     Set [UserId] = @UserId
                                         ,[BoardId] = @BoardId
                                         ,[IsPublic] = @IsPublic
                                     Where UserBoard.Id = @Id", userBoard);
         return(result == 1);
     }
 }
 public bool AddNewUserBoard(UserBoardsDto input)
 {
     using (var db = GetConnection())
     {
         db.Open();
         var result = db.Execute(@"Insert into UserBoard
                                             ([UserId]
                                             ,[BoardId]
                                             ,[IsPublic])
                                         Values
                                             (@UserId
                                             ,@BoardId
                                             ,@IsPublic)", input);
         return(result == 1);
     }
 }
Пример #3
0
 public bool Put([FromBody] UserBoardsDto userBoard)
 {
     return(_repo.UpdateUserBoard(userBoard));
 }
Пример #4
0
 public bool Post([FromBody] UserBoardsDto input)
 {
     return(_repo.AddNewUserBoard(input));
 }