Entity SQL

using (var db = new DbContext("..."))
{
    ObjectContext objectContext = ((IObjectContextAdapter)db).ObjectContext;
    ObjectQuery<Student> student = objectContext.CreateQuery<Student>("Query...");
    var newStudent = student.First();                
}

using (EntityConnection connection = new EntityConnection("..."))
{
    connection.Open();
    EntityCommand command = connection.CreateCommand();
    command.CommandText = "...";
    using (EntityDataReader rdr = command.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.CloseConnection))
    {
        while (rdr.Read())
            Console.WriteLine("{0} - {1}", rdr.GetInt32(0), rdr.GetString(1));
    }
}

Native SQL

Entity Types

var students = db.Students.SqlQuery("Select * FROM Student").ToList();
var student = db.Students.SqlQuery("Select * FROM Student WHERE StudentName = 'Bill'").FirstOrDefault();

Non-Entity Types

var studentName = db.Database.SqlQuery<string>("Select studentname from Student where studentid=1").FirstOrDefault<string>();

Raw SQL Commands

// Update command
int noOfRowUpdated = db.Database.ExecuteSqlCommand("Update Student SET StudentName ='changed' WHERE StudentId = 1");
	
// Insert command
int noOfRowInserted = db.Database.ExecuteSqlCommand("INSERT into student(studentname) values('New')");
	
// Delete command
int noOfRowDeleted = db.Database.ExecuteSqlCommand("DELETE FROM Student Where Studentid = 1");