@model Movie
@foreach (var v in M.Vals())
{
INSERT INTO @v.TblName()
( @v.In().ColNames() )
VALUES ( @v.In().Pars() );
SET @v.Par(m => m.Id) = SCOPE_IDENTITY();
}
INSERT INTO "Movie"
( "Title", "Rating" )
VALUES ( @P0, @P1 )
SET @P2 = SCOPE_IDENTITY();
INSERT INTO "Movie"
( "Title", "Rating" )
VALUES ( @P3, @P4 )
SET @P5 = SCOPE_IDENTITY();
@result Movie
@model int
SELECT
@R.Map()
FROM
@R.Tbl()
WHERE
@R.Col(m => m.Rating) >= @M.Par()
ORDER BY
@R.Col(m => m.Rating) DESC
SELECT
"T0"."Id" AS "Item.Id",
"T0"."Title" AS "Item.Title",
"T0"."Rating" AS "Item.Rating"
FROM
"Movie" "T0"
WHERE
"T0"."Rating" >= @P0
ORDER BY
"T0"."Rating" DESC