Example #1
0
        public async Task AttachWallToUser(UserWallDTO userWallDTO)
        {
            var user = await unitOfWork.Users.GetByEmailAsync(userWallDTO.Email);

            var wall = await unitOfWork.Walls.GetAsync(userWallDTO.WallId);

            wall.UserId = user.Id;

            await unitOfWork.CompleteAsync();
        }
Example #2
0
        public async Task <IActionResult> AttachWallToUser([FromBody] UserWallDTO userWallDTO)
        {
            try
            {
                await sensorService.AttachWallToUser(userWallDTO);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }