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

  • SEARCH
  • Home
  • 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 6875675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:23:01+00:00 2026-05-27T04:23:01+00:00

I use filehelper 2.9.9 at http://teamcity.codebetter.com/project.html?projectId=project41 to export my data to CSV format. I

  • 0

I use filehelper 2.9.9 at http://teamcity.codebetter.com/project.html?projectId=project41 to export my data to CSV format.
I use [FieldNotInFile] to ignore some field I don’t want to export.
I also use MetadataType to avoid edit model when my database changes
Here’s my codes:

public partial class book
{
    public long id { get; set; }
    public string book { get; set; }
    public virtual author author { get; set; }
}


[MetadataType(typeof(bookMetadata))]
[DelimitedRecord(",")]
public partial class book
{

}

public class bookMetadata
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [FieldNotInFile] //It don't work at all
    public long id;

    [DisplayName("Book")]
    public string book { get; set; }
    public author author;



    [FieldNotInFile] //It don't work at all
    private author _author;

    public author author
    {
        get { return _author; }
        set { _author = value; }
    }
}

My problems here is when I apply [FieldNotInFile] attribute in metadata, it doesn’t work at all.
When I encapsulate field in model that is generated by database and apply attribute, it works perfectly. However every time the database changes, I must merge them by hand.

Any help is appreciated
Thank in advance

  • 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-05-27T04:23:01+00:00Added an answer on May 27, 2026 at 4:23 am

    This is probably the limitation of FileHelper (it probably just uses reflection to find attributes on the serialized class and is not aware of metadata buddy class).

    Try creating a Model class for it, copy the data using AutoMapper and that apply your attribute to the Model class. Editing generated code is to error-prone, IMHO.

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

Sidebar

Related Questions

Use http://jobs.sitesixteen.com/ for reference. I'm using YQL for the city, state auto-complete. IF you
Use case: we have some project meta-data files which we want tracked, but are
use LWP::Simple; use Parallel::ForkManager; @links=( [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-windows.exe,SweetHome3D-2.1-windows.exe], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-macosx.dmg,SweetHome3D-2.1-macosx.dmg], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3DViewer-2.1.zip,SweetHome3DViewer-2.1.zip], ); # Max 30 processes for
We use a data acquisition card to take readings from a device that increases
Question: I need to read a CSV file. I use the FileHelpers library to
i´m using ARC to update my old project. I have a Filehelper class in
I'm attempting to use symmetric encryption to encrypt some data, and store the key
use grep command to find txt files containing telephone number. telephone number format could
String returned by string.Format seems to use some strange encoding. Spaces contained in format
use a reapeter to display data, but sometimes the data is to big to

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.