Thursday, May 9, 2013

Call stored procedure with parameters using Entity Framework 5 and return scalar

Entity Framework 5 using a DbContext
bool result = myDbContext.Database.SqlQuery<bool>(
   "myProc @param1, @param2",
   new SqlParameter("param1", id),
   new SqlParameter("param2", name))
   .First();

No comments:

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...