0

Hello everyone.

I am creating a website. In this website I add three folders:

  1. Entities
  2. Business logic
  3. Data access logic

Now I wanna to access entities folder class functions into business logic folder class.

But when I try to add namespace of that class into my another class, it does not show the names of classes (no intelligence).

Here is my code of Entity class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for State
/// </summary>
namespace StateBLL
{
    public class State
    {
        #region private variable

        private string _State;

        #endregion


        #region Properties

        public string State
        {
            get
            {
                return _State;
            }
            set
            {
                _State = value;
            }
        }

        #endregion
    }
} 

I Want to access this class (StateBLL) in another class. But I am not able to do this.
Please tell me where I am wrong

8
  • Is your problem that you cannot instantiate a StateBLL object in another class? Commented Aug 29, 2013 at 10:26
  • Have you added a reference from the class wanting to access this another classStateBLL Commented Aug 29, 2013 at 10:27
  • @NWard yes nward it is my problem Commented Aug 29, 2013 at 10:28
  • Try add something like "using BusinessLogic;" or whatever namespace your class implemented into. Commented Aug 29, 2013 at 10:30
  • its give me error that type or namespace could not be found Commented Aug 29, 2013 at 10:32

3 Answers 3

1

Try to add reference of Entity Library to your Business Library and then add

using YourEntityLibray;

In your Business Library's Class

Sign up to request clarification or add additional context in comments.

Comments

0

you need to follow these steps

 right click BL-->Add reference-->Projects--> select entities project

now on the page where you want to instantiate your class add

using nameofyourentitylibrary; //replace nameofyourentitylibrary with the name of namespace

now you can instantiate

8 Comments

ya i try it but what i add there is nothing to add when i follow this steps its show me blank dialog box where my project is
you can browse the dll of your entity project as well. click browse in the add reference dialog and point it to the dll of your entity project
there is no dll anywhere in my project i build the project too
it will be in the bin directory of your entity project
bin directory is empty :(
|
0

First , remember entity make sure it should be public,so you can access anywhere second ,build entity class and add reference to another class ,by right click on the folder add reference. after that add namespace of entity then you can access your entity class

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.