Exemplo n.º 1
0
 public List <Department> GetAllDepartments()
 {
     using (var db = new LinqDataClassesDataContext(DatabaseConnectionString.Get()))
     {
         return(db.ExecuteQuery <Department>("exec AllDepartments").ToList());
     }
 }
Exemplo n.º 2
0
 public string StripWWWAndCom(string url)
 {
     using (var db = new LinqDataClassesDataContext(DatabaseConnectionString.Get()))
     {
         return(db.ExecuteQuery <string>($"SELECT dbo.StripWWWandCom('{url}')").FirstOrDefault());
     }
 }
Exemplo n.º 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);
            }
        }