SQL to LINQ generator - sql

I am new to LINQ and just wanna know; is there any application in which I type standard SQL and it gives me its representing statement in linq?

Previous SO on similar topic:
SQL to LINQ Tool

Related

Can Entity Framework (LINQ) select rows based on JSON where clause?

I have a column in a SQL database table of JSON data. Can I use Entity Framework and LINQ to query and filter based on a field/value in the SQL JSON column?
I am using SQL 2016, VS 2017, EF Core 2.0, .NET Core 2.0.
Brian provides some links to a few good options. I think these all still require you to fully receive the SQL data, then apply filtering in .NET code; I'd really like to filter on the SQL server side of things and avoid pulling back all the rows, then filtering.
In addition, because my JSON data can have different properties for each row, filtering with SQL Server would be best.
I'm going to opt for using a SQL statement in LINQ per Brian's Code Project reference:
var blogs = _context.Blogs
.FromSql<Blog>(#"SELECT * FROM Blogs WHERE JSON_VALUE(Owner, '$.Name') = {0}", Owner)
.ToList();

Execute valid Oracle DB query in Microsoft Query

I've written an oracle query which executes fine against Oracle 11g DB (I wrote it in PL/SQL developer). But when I try to copy/paste it into Microsoft Query as SQL, it fails with ORA-00900: invalid SQL statement.
Is there a list of what can be included in query for Microsoft Query to be treated as valid? In my query I use a lot of SQL modelling - is it not supported?
I don't believe any of the MODEL features of Oracle are supported by any MS SQL variant.
But as that is an ORA message you are still executing against Oracle, I have to assume that the connection is messing with the SQL. Why do you need to issue the sql through MS Query?
(Perhaps you could define a view/function/proc in Oracle with your model syntax, and then use that object through MS Query)

LinqPad - write SQL and it converts to Linq Lambda

Does LinqPad have a way such that you write the query in SQL and it converts to Lambda Expressions in Linq?
LINQPad doesn't do this.
But Linqer does!

Data in SQL wont sync with Linq DataContext using traditional SQL syntax

I perform selects with linq to sql in my app and other things (insert,update,delete) by traditional sql syntax.
But, when I insert or delete something, my datacontext doesn't update. So, if I search for the ID of selected object, an empty query returns. I checked the DB and I'm sure that sql syntax works fine.
In short, when I do something with my DB with sql syntax it changes my db but not the DataContext instance!
Are you saving the data? E.g. calling Context.SaveChanges() or whatever the equivalent is?
Link to SQL DataContext have a cache system. Look at the DataContext.Refresh method group for methods to refresh your entities. Another simple solution is to reinstanciate your DataContext after doing some raw SQL.
If you want to use Linq to Sql you should do all operations with that,It means if you want to do some raw Sql still you should use Linq to Sql syntax if not your link to data base won't update.
So I switched to Linq to Sql completely.
Thanks All
Useful info : http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-1-introduction-and-model.aspx

What is a dynamic SQL query, and when would I want to use one?

What is a dynamic SQL query, and when would I want to use one? I'm using SQL Server 2005.
Here's a few articles:
Introduction to Dynamic SQL
Dynamic SQL Beginner's Guide
From Introduction to Dynamic SQL:
Dynamic SQL is a term used to mean SQL code that is generated programatically (in part or fully) by your program before it is executed. As a result it is a very flexible and powerful tool. You can use dynamic SQL to accomplish tasks such as adding where clauses to a search based on what fields are filled out on a form or to create tables with varying names.
Dynamic SQL is SQL generated by the calling program. This can be through an ORM tool, or ad-hoc by concatenating strings. Non-dynamic SQL would be something like a stored procedure, where the SQL to be executed is predefined. Not all DBA's will let you run dynamic SQL against their database due to security concerns.
A dynamic SQL query is one that is built as the program is running as opposed to a query that is already (hard-) coded at compile time.
The program in question might be running either on the client or application server (debatable if you'd still call it 'dynamic') or within the database server.