Example #1
0
 public List <Department> GetAllDepartments()
 {
     using (var db = new LinqDataClassesDataContext(DatabaseConnectionString.Get()))
     {
         return(db.ExecuteQuery <Department>("exec AllDepartments").ToList());
     }
 }
Example #2
0
 public string StripWWWAndCom(string url)
 {
     using (var db = new LinqDataClassesDataContext(DatabaseConnectionString.Get()))
     {
         return(db.ExecuteQuery <string>($"SELECT dbo.StripWWWandCom('{url}')").FirstOrDefault());
     }
 }
Example #3
0
        public List <string> GetAllEmployeeNames()
        {
            using (var db = new LinqDataClassesDataContext(DatabaseConnectionString.Get()))
            {
                var result = (from e in db.Employees select e.LastName + ", " + e.FirstName).ToList();

                return(result);
            }
        }