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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:49:00+00:00 2026-05-20T04:49:00+00:00

I will use LINQ-to-SQL when the database is ready and use the entities there

  • 0

I will use LINQ-to-SQL when the database is ready and use the entities there as models in my aplication. I’m trying to program against a interface to make changes to the program easier and I just realized that if I would later change from LINQ to something else I would have to create new model objects that would represent something very similar to the LINQ entities.

So I thought of creating interfaces for each entity and expose the properties and methods I would use in the program and aren’t LINQ specific. But when I would apply this interface to the entity class would the implementation automatically bind to it’s properties.

I’ll give you an example to explain better.

I have table Cars that amongst others has the columns producer, type and wheels

So I make the interface ICar

public interface ICar
{
    string Producer { get; set; }
    string Type { get; set; }
    int Wheels { get; set; }
}

The Car entity object will have these exact properties so will that work as the implementation of these properties or will they be defined seperatly so you get ICar.Producer and Car.Producer in the class?

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

    This might be helpful: Linq to Sql, Programming Against an Interface and the Repository Pattern

    First link is broken, check here instead: ORM and Repository pattern

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

Sidebar

Related Questions

I have to select data from database using LINQ to SQL. There is a
I'm working on a personal project (C# / ASP.NET) that will use LINQ to
I'm trying to develop an application that will use getImageData in javascript in Firefox
we have designed a multi threaded server that use linq to sql at each
I make a distributed embedded application that will make use of several micro-controllers. The
I'm starting to learn database, and I will work with SQLce. Is there some
I have an SQL Server 2008 Database and am using C# 4.0 with Linq
Many times I will use the same font scheme for static text in a
I am writing my first project that will use autoconf and teaching it to
I am building a simple Django app that will use scribd to display documents.

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.