SHARE
TWEET

Untitled

a guest Jul 15th, 2013 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static void GetTotalIncome(int startYear, int endYear, string companyName)
  2.     {
  3.         NORTHWNDEntities db = new NORTHWNDEntities();
  4.  
  5.         using (db)
  6.         {
  7.             SqlParameter startYearParam = new SqlParameter("@startYear", startYear);
  8.             SqlParameter endYearParam = new SqlParameter("@endYear", endYear);
  9.             SqlParameter name = new SqlParameter("@companyName", companyName);
  10.  
  11.             var income = db.Database.ExecuteSqlCommand("usp_FindTotalIncome @startYear, @endYear, @companyName", startYearParam, endYearParam, name);
  12.  
  13.             Console.WriteLine("Total income is {0}", income);
  14.         }    
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top