I am getting
Incorrect syntax near 'ABC.Security.GetUserLocation'.
when executing a stored procedure with the following code.
.
dots are the part of Name (for grouping), don't confuse it with Schema.
Something like "FirstName.LastName". I can execute it from SSMS without any problem.
var userNameToSearch = new SqlParameter("@userName", userName);
userNameToSearch.DbType = System.Data.DbType.String;
userNameToSearch.Size = 100;
List<Location> locations = db.Database.SqlQuery<Location>(@"[ABC.Security.GetUserLocation]", userNameToSearch).ToList();
return locations;
What would be the right way to use names like that from C# code ?