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 7026077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:04:10+00:00 2026-05-28T00:04:10+00:00

We have an existing Firebird database which we wish to setup in an ASP.NET

  • 0

We have an existing Firebird database which we wish to setup in an ASP.NET MVC project. By adding a ‘ADO.NET Entity Data Model’ item to the project and selecting the Firebird database in question, we are able to get automatically generated Models.edmx and Models.designer.cs files, which visually display the database tables and relationships.

In addition to this, as I understand it, when the application is built, behind the scenes it generates a Models.csdl, Models.ssdl and Models.msl.. but these files cannot be viewed or modified.

I don’t like so much control being taken away from me. It makes me nervous that I know so little about how my model is being mapped. I also don’t like having my Model classes automatically generated, as I want to add my own methods on to the model.

Can anyone tell me how I can build an ASP.NET MVC application without having my models automatically generated? I’d much prefer to map it out myself without any kind of wizard process, in order to gain a greater understanding.

Edit:

Now I’m getting somewhere. Here’s the code for one of my models and the context object.

using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

public class COMPANY
{

    [Key]
    public string CODE { get; set; } 
    public string NAME { get; set; }

}

public class ModelContext : DbContext
{


    public DbSet<COMPANY> Companies { get; set; }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {

        modelBuilder.Entity<COMPANY>().ToTable("COMPANY");

        base.OnModelCreating(modelBuilder);
    }
}

And connection string

<add name="ModelContext"
   connectionString="data source=localhost;initial catalog=C:\SUPPORT.gdb;user id=SYSDBA;password=masterkey;character set="
   providerName="FirebirdSql.Data.FirebirdClient" />

The connection string has to have the same name as the db context! (or be overridden somewhere else)

Now just generate the controller automatically and you’re good to go. If your database schema is anything like mine, you’re going to run into problems with the mappings and you’ll need to customize them.

  • 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-28T00:04:10+00:00Added an answer on May 28, 2026 at 12:04 am

    The great thing about MVC is that you get to decide what happens with the implementation. Simply make a connection string in your root web.config file, make a model .cs that contains a mapping of your current database tables, then make a data access layer database context (entity framework makes this happen with a simple implementation). Then in your repository or controller you can access the database context, and through linq, access all your database data and manipulate it.

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

Sidebar

Related Questions

I have existing ASP.NET MVC View pages and View user controls which I currently
I have existing code for an ASP .NET application that uses reflection to load
I have a MySQL 5.5 database that I wish to migrate to Firebird Server
I have existing Linux shared object file (shared library) which has been stripped. I
I'm working on a project where the client wants to have existing pages dynamically
For whatever reason, I have a lot of clients that have existing data that's
I have an existing database with the table Transactions in it. I have added
I have an existing C++ project on a linux environment, and would like to
I have an existing site running BlogEngine.NET 1.5 and will be upgrading it to
I have an existing iphone project with a UITabBar. Now I need styled text

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.