Bitboxx.DNNModules.BBImageStory.Components.DbController.GetImagesByForeign C# (CSharp) Method

GetImagesByForeign() public method

public GetImagesByForeign ( int foreignId, string token ) : IEnumerable
foreignId int
token string
return IEnumerable
        public IEnumerable<ImageLocInfo> GetImagesByForeign(int foreignId, string token)
        {
            using (IDataContext context = DataContext.Instance())
            {
                string sqlCmd = " SELECT Image.ImageId, Image.TextPosition, '' AS ShortDescription, '' AS LongDescription,iFiles.FileName, " +
                                " iFiles.Extension , iFiles.Folder , iFiles.Height , iFiles.Width , iFiles.Size," +
                                " ForeignImage.ViewOrder, @0 AS ForeignId" +
                                " FROM {databaseOwner}[{objectQualifier}" + Prefix + "ForeignImage] ForeignImage" +
                                " LEFT JOIN {databaseOwner}[{objectQualifier}" + Prefix + "Image] Image ON ForeignImage.ImageId = Image.ImageId " +
                                " LEFT JOIN {databaseOwner}[{objectQualifier}Files] iFiles ON Image.FileId = iFiles.FileId " +
                                " WHERE ForeignImage.ForeignId = @0 " +
                                " AND ForeignImage.ForeignToken = @1 " +
                                " ORDER BY ForeignImage.ViewOrder";

                return context.ExecuteQuery<ImageLocInfo>(CommandType.Text, sqlCmd, foreignId, token.ToUpper());
            }
        }

Same methods

DbController::GetImagesByForeign ( int foreignId, string token, string language ) : IEnumerable