public GetPropertyResponseDto GetPropertyForAccess() { var response = new GetPropertyResponseDto(); var properties = _iPmsLogic.GetPropertyForAccess(); if (properties == null || properties.Count <= 0) { return(response); } response.Properties = properties; return(response); }
public GetPropertyResponseDto GetAllProperty(int userId = 0) { var response = new GetPropertyResponseDto(); if (!AppConfigReaderHelper.AppConfigToBool(AppSettingKeys.MockEnabled)) { return(GetPropertyByUserId(userId)); } else { //mock data } return(response); }
public GetPropertyResponseDto GetPropertyById(int propertyId) { var response = new GetPropertyResponseDto(); if (propertyId <= 0) { return(response); } var propertyResponseDto = GetAllProperty(); if (propertyResponseDto == null || propertyResponseDto.Properties == null || propertyResponseDto.Properties.Count <= 0) { return(response); } response.Properties = propertyResponseDto.Properties.Where(x => x.Id.Equals(propertyId)).ToList(); return(response); }
public GetPropertyResponseDto GetPropertyByUserId(int userId) { var response = new GetPropertyResponseDto(); if (userId <= 0) { return(response); } var properties = _iPmsLogic.GetAllProperty(); if (properties == null || properties.Count <= 0) { return(response); } response.Properties = properties.Where(x => x.UserId.Equals(userId)).ToList(); return(response); }