Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkresner/3860210 to your computer and use it in GitHub Desktop.
Save jkresner/3860210 to your computer and use it in GitHub Desktop.
Facebook Realtime Updates w C#/Asp .net Mvc 4, EF5 CodeFirst (30 mins setup|Oct 2012)
WebSecurity.InitializeDatabaseConnection("fbRealtimeWebContext", "UserProfile", "UserId", "UserName", autoCreateTables: true);
Steps
1) Create new Mvc4 Internet Application
2) In the models folder create the POCO object FBRealtimeUpdate
3) Use nuget to grab MvcScaffolding package
4) In package manager console type 'Scaffold Controller FbRealtimeUpdate -Repository'
5) Change your "DefaultConnection" connection string to match the name of your DbContext i.e. fbRealtimeWebContext
6) Update InitializeSimpleMembershipAttribute.cs to use fbRealtimeWebContext connection string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment