public async Task <MainScreenResponse> UpdateScreen(ScreenRequest screenRequest) { try { var getScreen = _screenRepository.GetScreenById(screenRequest.ScreensId); if (getScreen.Result != null) { var Screen = _mapper.Map <Screens>(getScreen.Result); Screen.ScreensName = getScreen.Result.ScreensName; Screen.Description = getScreen.Result.Description; Screen.ModifiedOn = DateTime.Now; Screen.ModifiedBy = screenRequest.UserId.ToString(); var dataScreen = await _screenRepository.UpdateAsync(Screen); } else { _response.Message = Constants.Screen_Not_Update; _response.Status = false; return(_response); } _response.Message = Constants.Screen_Update_Success; _response.Status = true; return(_response); } catch (Exception ex) { var msg = ex.Message; _response.Status = false; _response.Message = Constants.DEFAULT_ERROR_MSG; } return(_response); }