The FunctionImport 'GetEmployee' could not be found in the container 'CtxDb'
Qualify the function import with the container name like this:
public virtual ObjectResult<Employee> GetEmployee()
{
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Employee>("EntityContainerName.GetEmployee");
}
The entity container name is found on your EDMX - right click anywhere and do "Properties".
source
Alternative way:
public virtual ObjectResult<Employee> GetEmployee() {
return this.Database.SqlQuery<Employee>("GetEmployee");
}