Linq To Sql

  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Linq To Sql as PDF for free.

More details

  • Words: 485
  • Pages: 12
! ' , / +0 1 / $2 3 7 4 &4 * .

&4

.+ ! ( /5 6

"# $% )$ *

& + ,-

8 $60 !9$# 1

$: ;

Language-INtegrated Query

<6

!""#

>? += & ' +6 $1 9 7> ; + 9 &4 ! ! >@ ; ' 9 ,$ : B .B + ! A D +

+ B9 ; - ! 9 A$ % & +

! 7$

' ()

$ - ! > C,

$ $

, $ - C6

%& )%* E

& F +

B ! >@ ; ,-.

/

%+

$ 0

+ 9+

/0 '

$

'''

+ $A

( >8# !

!6

9

E

$ ,G

;

9

$

.B +

$ .9 ,!

D . + H- $1

' + K1' +

A ( J $1 $

& ;

OP

&4 )

$-

9

A

I

J $1

;

$

J $1 ) $

+ LM

@& 9

( 1'

+ N*

+ $-

$ LM

&

; R2 C6 Q

! $9 S ! C6

+

-

2 C6

! C6

' + ; + LM

3

, ; TF

A(

.+6 L M .+ !

A ( $I+1 E

1'

;

!U , :

93

B#

3? 4

54 ' R C6 Q

C6

%4

.

.9 !

$

6

V# 5: (

$ )$A

7 'I

A( &

$

7>

'6 ' )

+ !

8'

V

$

+ !

A(

% ( ;

$

;

TestDataContext ) I 3

)

7>

. - B ; 7> -

.U

!# !

$9

3

$

'0 $

&

TestDataContext Bank=new TestDataContext();

D.+

I

)

5:

var Query = from T in Bank.Test_Tables where T.Age > 10 select T;

. + W $= & X = & . 8B 4

$Y

-

Var )

A 5:

.9 8'

$

dataGridView1.DataSource = Query;

TestDataContext Bank=new TestDataContext(); var Query = from T in Bank.Test_Tables where T.Age > 10 select T; dataGridView1.DataSource = Query;

D.B +

)

TestDataContext Bank=new TestDataContext(); int SelectedId = 5; var Query = (from P in Bank.Test_Tables where P.ID == SelectedId select P).Single(); Query.FName = "Change"; Query.LName = "Change";

Query.Age = 0; Bank.SubmitChanges();

0 C

E, ; E A +6 3

;

) I

+6

Z Single()

/ $ Y .9 SubmitChanges()

Inheritance Modifier

$ Y C #3 .

6+

$ D 6

$ Y Sealed

9 TestDataContext Bank = new TestDataContext(); Test_Table test_table = new Test_Table(); test_table.Age = 22; test_table.FName = "X"; test_table.LName = "XXXX"; Bank.Test_Tables.InsertOnSubmit(test_table); Bank.SubmitChanges();

: TestDataContext Bank = new TestDataContext(); var Query = (from P in Bank.Test_Tables where P.ID == 5 select P).Single(); Test_Table TT = new Test_Table(); Bank.Test_Tables.DeleteOnSubmit(Query); Bank.SubmitChanges();

3 C,

C? C?

$ ,G $I $I

D .+6

$1

A(

$1 ;

$

5 :'. + A (

7

.

$ -

'.

7>

$I

$1

TestDataContext Bank = new TestDataContext(); Bank.Pro();

Related Documents

Linq To Sql
April 2020 4
Linq To Sql
October 2019 14
Linq
October 2019 16
Linq
August 2019 26
Linq To Objects
November 2019 6