但是文件夹里的方法(GetBooksBySql(sqlHot)),在文件夹外用的时候
IList<Book> books=new List<Book>();
List<string> results=new List<string>();
string sqlHot="select top 3 * from books where title like '"+title+"%' order by clicks desc";
[u] books=GetBooksBySql(sqlHot);
错误是
找不到GetBooksBySql(sqlHot)
这是文件夹里的
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using MyBookShop.Models;
namespace MyBookShop.DAL
{
public static partial class BookService
这是文件夹外的
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using MyBookShop.Models;
namespace MyBookShop.DAL
{
public static partial class BookService