Click here to Skip to main content
15,886,773 members
Home / Discussions / C#
   

C#

 
GeneralRe: please recommend a book for beginner Pin
solo920-Jun-14 16:23
solo920-Jun-14 16:23 
GeneralRe: please recommend a book for beginner Pin
Peter Leow20-Jun-14 16:36
professionalPeter Leow20-Jun-14 16:36 
AnswerRe: please recommend a book for beginner Pin
OriginalGriff20-Jun-14 19:03
mveOriginalGriff20-Jun-14 19:03 
GeneralRe: please recommend a book for beginner Pin
solo921-Jun-14 1:44
solo921-Jun-14 1:44 
GeneralRe: please recommend a book for beginner Pin
harold aptroot21-Jun-14 2:06
harold aptroot21-Jun-14 2:06 
GeneralRe: please recommend a book for beginner Pin
OriginalGriff21-Jun-14 2:26
mveOriginalGriff21-Jun-14 2:26 
GeneralRe: please recommend a book for beginner Pin
solo921-Jun-14 11:29
solo921-Jun-14 11:29 
QuestionProblem with get() method! Pin
LAPEC20-Jun-14 7:07
LAPEC20-Jun-14 7:07 
Hello everyone

I'm trying to solve this problem but i can't get it. Maybe someone can help me solve this problem please...

When I compile the error says:

Quote:
Error 'System.Collections.Generic.Dictionary<string,nhibernate.isessionfactory>' does not contain a definition for 'get' and no extension method 'get' accepting a first argument of type 'System.Collections.Generic.Dictionary<string,nhibernate.isessionfactory>' could be found (are you missing a using directive or an assembly reference?)


C#
protected static ISessionFactory getSessionFactory(string configFile) 
        {
		    if (null == configFile) 
            {
			    if (sessionFactory == null) 
                {
                    throw new Exception("The session factory has not been initialized (or an error occurred during initialization)");
                }
			    else
                {
                    return sessionFactory;
                }
		    }
		    else 
            {
			    if (sessionFactoryMap == null)
                {
                    throw new Exception("The session factory for '" + configFile + "' has not been initialized (or an error occurred during initialization)");
                }
			    else 
                {
				    ISessionFactory sf = (ISessionFactory) sessionFactoryMap.get(configFile);
				    if (null == sf) 
                    {
                        throw new Exception("The session factory for '" + configFile + "' has not been initialized (or an error occured during initialization)");
                    }
				    else
                    {
                        return sf;
                    }
			    }
		    }
	    }


Thanks in advance
AnswerRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 7:59
professionalEddy Vluggen20-Jun-14 7:59 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:14
LAPEC20-Jun-14 8:14 
GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 8:36
professionalEddy Vluggen20-Jun-14 8:36 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:43
LAPEC20-Jun-14 8:43 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:46
LAPEC20-Jun-14 8:46 
GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 9:01
professionalEddy Vluggen20-Jun-14 9:01 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 9:05
LAPEC20-Jun-14 9:05 
GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 9:23
professionalEddy Vluggen20-Jun-14 9:23 
QuestionException Handling / Response Question Pin
Kevin Marois20-Jun-14 6:45
professionalKevin Marois20-Jun-14 6:45 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 7:37
mvePIEBALDconsult20-Jun-14 7:37 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 7:39
professionalKevin Marois20-Jun-14 7:39 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 7:44
mvePIEBALDconsult20-Jun-14 7:44 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 7:52
professionalKevin Marois20-Jun-14 7:52 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 8:05
mvePIEBALDconsult20-Jun-14 8:05 
AnswerRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 8:05
professionalEddy Vluggen20-Jun-14 8:05 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 8:18
professionalKevin Marois20-Jun-14 8:18 
GeneralRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 9:21
professionalEddy Vluggen20-Jun-14 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.