Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
error message:
'System.Web.HttpContext' does not contain a definition for 'SaveChanges' and no extension method 'SaveChanges' accepting a first argument of type 'System.Web.HttpContext' could be found (are you missing a using directive or an assembly reference?)

code here


ChatMessage_tbl newchatting = objChatting;
using (ChatingEntities context = new ChatingEntities())
{
context.ChatMessage_tbl.Add(newchatting);

Context.SaveChanges();
}
Posted
Comments
[no name] 11-Jul-14 14:50pm    
The error message means exactly what it says. HttpContext does not have a method named SaveChanges.
awaisshabir 11-Jul-14 15:03pm    
thanks sir for ans me i'm solve this issuse

1 solution

Hi,

In your last line you refer to Context (with uppercase) instead of context (with lowercase). These are 2 different objects.

HTH,
Gaston
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900