Last post May 14, 2013 04:47 AM by Amy Peng - MSFT
May 09, 2013 02:52 PM|fr3d|LINK
I want to make web service for n tier web site.I used business tier and datalayer.
I want to make asmx for two layer.I make web service and copied to functions under [webmethods] in new web service.
But my all functions connect to data layer.Like that
public DataSet Check(string userName, string password)
string query = "SELECT * FROM Newuser WHERE Address = @Username AND Pass = @Password";
MySqlCommand command = new MySqlCommand(query);
command.Parameters.Add(new MySqlParameter("@Username", userName));
command.Parameters.Add(new MySqlParameter("@Password", password));
return DATALAYER.DataTier.Default.SelectCommandParameterized(query, command);
I added project DATALAYER to same solution.After that I added reference datalayer.dll. But vs2012 dont allow this.It underline DATALAYER.And error:
THE name "DATALAYER " does not exist in the current context.
How to make web services business layer ?
Thanks in advance
May 10, 2013 04:58 AM|sameer_khanjit|LINK
May 14, 2013 04:47 AM|Amy Peng - MSFT|LINK
I see that you want to use Web Services in a 3-tier architecture. In logical design there is standard approach: UI layer-> BL layer -> DAL.
For how to create this architecture, there are many good tutorials which you can refer to:
Hope it can help you.