FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Stop using magic strings in your Firestore .NET queries
NewsTools

Stop using magic strings in your Firestore .NET queries

via Dev.toMihail Brinza1d ago

If you use Firestore with .NET, you've probably written code like this: query . WhereEqualTo ( "Location.home_country" , "Portugal" ); That "Location.home_country" is a string. Nobody checks it at compile time. If you typo it, rename a property, or forget that your C# property Country maps to home_country in Firestore, you won't know until runtime. I kept running into this in my own projects, so I wrote a typed wrapper around Google's official Firestore client that uses lambda expressions instead of strings. What it looks like // Before — string-based, no compile-time checking query . WhereEqualTo ( "Locaiton.home_country" , "Portugal" ); // typo, compiles fine // After — lambda-based, compiler catches errors query . WhereEqualTo ( u => u . Locaiton . Country , "Portugal" ); // CS1061: 'User' does not contain a definition for 'Locaiton' The library reads [FirestoreProperty] attributes automatically, so you always use the C# property name and it resolves the Firestore storage name for y

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles

Palmer Luckey’s retro gaming startup ModRetro reportedly seeks funding at $1B valuation
News

Palmer Luckey’s retro gaming startup ModRetro reportedly seeks funding at $1B valuation

TechCrunch • 19h ago

News

Cakelisp

Lobsters • 20h ago

News

Why octal notation should be used for UTF-8 (and Unicode) (2016)

Lobsters • 20h ago

From WAP to Agent-First: Why the UI Is Becoming Optional
News

From WAP to Agent-First: Why the UI Is Becoming Optional

Medium Programming • 20h ago

News

Solving Regex Crosswords Without Z3

Lobsters • 20h ago

Discover More Articles