In Entity Framework Core, there is no direct equivalent to the NOLOCK
hint in SQL. The NOLOCK
hint is used in SQL Server to allow a SELECT statement to read a table without acquiring a shared lock, and it can be used to improve query performance in certain scenarios.
Get Distinct Object by Id and Return Full Object with C# and EF
If you’re using Entity Framework Core in C# and you want to retrieve distinct items based on a specific property (e.g., ID) but still return the full object, you can use the GroupBy
method along with First
or FirstOrDefault
. Here’s an example assuming you have a class named YourEntity
with a property named Id
:
3D Printing – Tools and Materials for Finishing Prints
Creating a successful 3D print involves more than just hitting the “Print” button. To achieve that professional finish, post-processing steps are essential. In this blog post, we’ll explore the array of tools and materials that will help you elevate your 3D prints from raw prototypes to polished works of art.
Continue reading “3D Printing – Tools and Materials for Finishing Prints”How to submit AWS Batch Job with C#
Submitting an AWS Batch job using the AWS SDK for .NET (C#) involves a series of steps, including creating a job definition, specifying the job queue, and submitting the job. Here’s a basic example:
Continue reading “How to submit AWS Batch Job with C#”Find Gaps in Sequential Numbers in TSQL
To find gaps in ID numbers in a table using T-SQL, you can use a self-join or a common table expression (CTE) along with the LEAD
or LAG
window functions. Here’s an example using the LEAD
function to identify gaps in sequential ID numbers:
Subscribe to EventStore catch-up subscription from the start with C# example
EventStore is an open-source database technology designed for storing, retrieving, and querying event data using a stream-based approach. In EventStore, a catch-up subscription is used to read events from a given point in a stream and catch up to the most recent events. When starting a catch-up subscription, you can specify the starting position using an event number or position. However, in some cases, you might want to start from the beginning or the very first event. Here’s how you can achieve that:
Continue reading “Subscribe to EventStore catch-up subscription from the start with C# example”Entity Framework (EF) Core FluentApi Relationships without Navigation Properties
Entity Framework (EF) Core allows you to define relationships between entities using Fluent API, even without explicitly creating navigation properties. This can be useful when you want to define relationships between entities but don’t want to create navigation properties in your entity classes. Here’s how you can achieve this:
Continue reading “Entity Framework (EF) Core FluentApi Relationships without Navigation Properties”3D Printing – Maintenance and Repairs
3D printing has revolutionized industries by offering unprecedented flexibility in manufacturing, rapid prototyping, and customized design. However, like any technology, 3D printers require proper maintenance and occasional repairs to ensure consistent, high-quality prints. In this guide, we’ll delve into the world of 3D printing maintenance and repairs, equipping you with the knowledge to keep your printer running smoothly and troubleshoot common issues.
Continue reading “3D Printing – Maintenance and Repairs”Enabling word wrap for Ionic select component
In Ionic, implementing word wrapping for selectable items within a list or dropdown, commonly referred to as a “select” component, can enhance the user experience and readability. Here’s a general approach to achieving word wrap in an Ionic selectable component:
Continue reading “Enabling word wrap for Ionic select component”Case-insensitive “LIKE” search with EF Core and PostgreSQL
When using EF Core with PostgreSQL for a case-insensitive “LIKE” search, you can leverage PostgreSQL-specific features to achieve the desired behavior. PostgreSQL supports the ILIKE
operator, which performs a case-insensitive pattern matching operation. Here’s an example of how to perform a case-insensitive “LIKE” search using EF Core and PostgreSQL: