Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8468023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:48:55+00:00 2026-06-10T15:48:55+00:00

I use EntityFramework on my ASP.NET MVC project. Let’s say I have the entity

  • 0

I use EntityFramework on my ASP.NET MVC project.

Let’s say I have the entity below:

public class Project
{
    public int ProjectID { get; set; }
    public string Description { get; set; }
    public string Tags { get; set; }
}

Lets say I have the following data in my DB:

ProjectID: 1
Description: "My first element"
Tags: "one, three, five, seven"

ProjectID: 2
Description: "My second element"
Tags: "one, two, three, six"

ProjectID: 3
Description: "My third element"
Tags: "two, three, four"

I would like to collect all tags from all my records. So: “one, two, three, four, five, six, seven”

How can I do? This may seems a stupid question but I don’t know how to proceed.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T15:48:57+00:00Added an answer on June 10, 2026 at 3:48 pm

    You need to use string.Split() to dig out each tag in your list.

    HashSet<string> allTags = new HashSet<string>();
    foreach(Project project in context.Projects)
    {
        string tagsList = project.Tags;
        string[] separateTags = tagsList.Split(", ", StringSplitOptions.RemoveEmptyEntries);
        foreach(string separateTag in separateTags)
        {
            allTags.Add(separateTag);
        }
    }
    

    then allTags will contain all your tags. If you want to put them in one big string again, use string.Join.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use EntityFramework on my ASP.NET MVC project. Let's say I have the entity
I'm trying to use Entity Framework in an ASP.NET MVC web application. Let's say
I have .NET MVC 3 project where I use sql membership provider and entity
For my ASP.NET MVC 2 application I use Entity Framework 1.0 as my data
How do I use Datatable instead of Entity framework in Asp.Net mvc? I'm referring
I'm working on an asp.net-mvc project. I have an Items table and a Tags
I am developing a medium sized ASP.NET project using ASP.NET MVC and Entity Framework.
I have my asp.net mvc 3 application with entity framework and i used the
Are there any open-source examples of ASP.NET MVC applications that use the Entity Framework?
We use ASP.NET MVC 3 and Entity Framework 4 and annotate our entities with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.