Announcement Announcement Module
No announcement yet.
Dependency not injecting Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dependency not injecting


    I am fairly new to, even though I have used it before it was a long time ago and under guidance.

    I am trying to develop a fairly simple application.
    I have 3 projects,
    1. Asp.Net web app
    2. Business Layer class library
    3. DAL Class library

    I am trying to inject the DAL into the Business Layer, but the DAL in the business layer is always null.

    My springconfig is in my web app and looks like this

    <?xml version="1.0" encoding="utf-8" ?>
    <objects xmlns=""

    <dbrovider id="dbProvider"
    connectionString="Data Source=XXXX;Initial Catalog=XXXXX;Integrated Security=True;"/>

    <object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data">
    <property name="DbProvider" ref="dbProvider"/>
    <property name="DataReaderWrapperType" value="Spring.Data.Support.NullMappingDataReader, Spring.Data"/>

    <object name="taskDAL" type="XXOdotDAL.TasksDAL.TasksDAL, XXOdotDAL">
    <property name="AdoOperations" ref="adoTemplate"/>

    <object name="taskData" type="XXDot.Tasks.TaskData, XXDot">
    <property name="taskDAL" ref="taskDAL"/>


    The code in my business layer is as follows

    public ITasksDAL taskDAL { get; set; }

    public IList<Task> GetTasks(bool completed)
    IList<Task> allTasks = null;
    IList<TaskDO> tasksList = taskDAL.GetTasks(completed);
    allTasks = MapRows(tasksList);
    catch (Exception ex)
    throw ex;

    return allTasks;
    Anybody have any ideas what I am doing wrong or what I have missed out.
    Any help is appreciated