I have created a class
public static class UnitOfWorkFactory
{
public static T Resolve<T>()
{
return Application.UnityContainer.Resolve<T>();
}
}
Everything compiles fine unless I put this class in separate code file: The name 'UnitOfWorkFactory' does not exist in the current context. The problem persists even with no reference to assemblies:
public static class UnitOfWorkFactory
{
public static T Resolve<T>()
{
return default(T);
}
}
[Probably this is unrelated to the main question] Even more, if I try to run successfully compiled application it produces error: Parser Error Message: Could not load type 'MyWCFProject.Application'.
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="MyWCFProject.Application" Language="C#" %>
Please suggest what is going on here..
EDIT: I moved file from App_Code with its properties, that caused first error.