score:1
Accepted answer
you could do something like this, i suppose:
var result = context.yourtable.select(t => t.fieldname).distinct();
so, basically, your query is getting only distinct values for 'fieldname' (whatever that may be in your case).
Source: stackoverflow.com
Related Query
- Entity Framework with some table unique and other are different based on client
- Entity Framework Core code-first many-to-many properties in join table
- ASP.NET Core Web API - How get all employees user details and roles in Entity Framework result
- How to display values of one table which corresponds to a cell value of another table (with or without joins) in C# and .NET Core 3.1?
- In ASP.NET Core MVC, how to search in a table choosing from a <select> one of the <th> as the filter and keep the option selected after submitting?
- SQL table valued function and Entity Framework using C#
- ASP.NET Core Entity Framework relationship issue - Why no cascade delete and migration issue
- How do I contruct a query to find unmatched entities in related table with Entity Framework and .NET 5.0?
- How to update multiple records in a table Using the Linq for Entity Framework Core
- CORS problems using React and Entity Framework Core 5 Web API
- I am trying to update a record in a table using Entity Framework Core but I am getting an exception
- Inheritance Database in Entity Framework Core and ASP.NET Core MVC
- Entity Framework Core error "Column names in each table must be unique"
- bind combobox to one table and save the values in other table in winform
- Is it possible to dynamically map tables to Entity Framework core or any other ORM
- Entity Framework Core with PostgreSQL and SEQUENCE functionality
- Entity Framework Core and .NET Standard 2.0 - an inconsistent behavior
- Display list of Menu Permissions from table - replacing RoleId and UserId with RoleName and UserName in Entity Framework
- How would I merge two database i.e one created in plain old sql server and other in Entity framework?
- Entity Framework 6 giving adding _id to column in foreign table and can't see why?
- Entity framework core recursive navigated table query takes long time
- Authenticate ASP.NET Core 2.1 Web API with Azure Active Directory and Azure SQL with Entity Framework
- Inserting Scope identity into second table using Entity Framework and dynamic Json
- Entity Framework Core - How to handle Related Entity Mapping and Saving
- Conflict between Entity Framework Core and Entity Framework
- Create Table On RunTime in mysql using C# and entity framework
- Loading an item from a collection inside a collection LINQ Entity Framework Core
- Entity Framework returns every table from Azure DB instead of one
- Entity Framework 6 take records that don't exist in table
- Entity Framework : add entity to database skip added to specific table
More Query from same tag
- unity screen delta to world delta
- EWS communication error when downloading an email
- DevExpress Report Designer MVC make subreport use main report datasource
- using ServiceController class to find out struck or hung service
- TCP Listener stops listening after some time
- Connecting putty (or plink) to DaHaus
- Parsing based of property type
- Affecting Specific Records Within Crystal Report
- How to add hashmap to hashmap that alredy exists without overriding the information?
- WPF ComboBox binding not always working (property gets assigned from an async call)
- I want to do translate, rotate and scale while merging the two textures
- WMI Invalid Query in C# but works in wbemtest utility
- NUnit - Is there a way to find out which test case is being ran at a point in time?
- Unable to show selected MVC Radio button
- UWP: How to specify pane border when the pane is close?
- log all inbound connections powershell
- Confirming asp c# action on page load
- How to open file after each published application
- ComboBox setting a value C#
- Get data from any Web API to console application
- Set the speed of simulation for Selenium on Chrome
- Retrieve the previous indexed record in a list, if exists
- Update a dbf file with datagridview in C#
- Using ASP.NET MVC RedirectResult class in custom authentication filter
- JetBrains Rider not detecting mono or Unity API
- Call IServiceScopeFactory.CreateScope() in a scoped service
- Upload Documents from ASP.Net to Sharepoint Server
- How can I convert a gif image file from Bit depth 24 to Bit depth 8?
- Checkbox not working in Gridview to change color - Error Object not set to an instance of an object
- How to create subdocument in MongoDB with C#