Search code examples
.netvisual-studio-2010intellisensesummary

Intellisense doesn't work - Either with Summary Tag


I don't know what is going on..

I did a Repository Generic Pattern Interface for EntityFramework contexts, and my interface only contains 5 methods.

-Query -Insert -Delete -Synchronize -Dispose

I wrote the documentation in Summary Section, but when I use this class, the intelisense doens't show any information, so I try moved the summary to an interface and this class implements that interface, but doesn't work too.

Here are the classes and interface

 public interface IRepositorySource : IDisposable
{
    /// <summary>
    ///     Allow Queries with LINQ to Entities throught IQueryable interface
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <returns>Teste</returns>
    IQueryable<T> Query<T>() where T : class;

    /// <summary>
    ///     Insert the e object in specific table.
    ///     The inserted object is only on database after Synchronize was called.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="e"></param>
    void Insert<T>(T e) where T : class;

    /// <summary>
    ///     Delete the e object from specific table.
    ///     The deleted object is only removed from database after Synchronize was called.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="e"></param>
    void Delete<T>(T e) where T : class;

    /// <summary>
    ///     Synchronize the database with all pending operations.
    /// </summary>
    void Synchronize();

    /// <summary>
    ///     Free all managed resources such the connection and ObjectContext associated with the repository
    /// </summary>
    void Dispose();
}





/// <summary>
///     By inherit from this class, you get the Repository Patter to query the datasource.
/// </summary>
public class RepositoryBase : IRepositorySource, IDisposable
{
    readonly ObjectContext m_context;


    public RepositoryBase(ObjectContext context) 
    {
        if ( context == null )
            throw new ArgumentNullException("context");

        m_context = context;
    }


    ObjectSet<T> Table<T>() where T : class {

        //
        // As the entity framework creates the properties with the same name of the Type we want to access,
        // it is really easy to map those types to properties throught reflection
        // Get the property of the context with the name of the type.
        //

        return (ObjectSet<T>) m_context.GetType().GetProperty(typeof(T).Name).GetValue(m_context, null);
    }


    public IQueryable<T> Query<T>() where T : class {
        return Table<T>();
    }


    public void Insert<T>(T e) where T : class {
        Table<T>().AddObject(e);
    }


    public void Delete<T>(T e) where T : class {
        Table<T>().DeleteObject(e);
    }


    public void Synchronize() {
        m_context.SaveChanges();
    }

    public void Dispose() {
        m_context.Dispose();
    }
}

You know what's probably happening?


Solution

  • The solution I found was through the Visual Studio, Click on Class Library Project, Properties, Build, XML documentation file checked.