-4

So I have this query in PostgreSQL:

SELECT * FROM "Database";

Which works great, but now I want to do a more complicated query and I have no idea how.

So how can I write this Query in C#:

SELECT * FROM "Database"; 

closed as off-topic by Vince, nmtoken, Kersten, BERA, aldo_tapia Dec 21 '17 at 13:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions relating to general IT or with no clear GIS component, are off-topic here but can be researched/asked at Stack Overflow (software development), Super User (computing hardware and software), Database Administrators (relational databases) and other SE sites" – Vince, nmtoken, Kersten, BERA, aldo_tapia
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    So, what's your question? – T_Bacon Dec 21 '17 at 12:18
  • -1 because I found a solution in 3sec google search. See my answer. And actually it's also a bit off-topic. – pLumo Dec 21 '17 at 12:46
  • 2
    you edited your question to be even more useless... – pLumo Dec 21 '17 at 13:13
  • 2
    @RoVo I agree with your 2.ed comment but would call it more offtopic instead of useless... However IMO your first comment isn't valid because you have more experience in this field as OP and can, therefore, google more efficient and know the words you need to use in order to get meaningful results – LaughU Dec 21 '17 at 13:22
  • 1
    On the point of searching, it also worth bearing in mind that Google personalizes search results, so what one person finds on the first page another may not find until many pages down. – nmtoken Dec 21 '17 at 13:30
4

Use this:

return @"SELECT ST_AsGeoJSON(ST_Transform(geom, 32633)) 
    FROM ""Database"" 
    WHERE ST_Distance(ST_Transform(geom, 32633),
    ST_SetSRID(ST_Point(536251.378984788,5211860.67521085), 32633)) < 100";

(This is called Verbatim string literal)

(via)

Not the answer you're looking for? Browse other questions tagged or ask your own question.