Questions tagged [ef4-code-only]

86 questions
0
votes
3 answers

EF4 Code only ctp5: how set connectionstring devart oracle?

hi i have devart oracle provider 6(BETA), and want use code only ctp5...how i can set connectionstring for oracle?i started now with Code only and i need use oracle, anyone can help me?
Stefhan
  • 610
  • 1
  • 5
  • 17
0
votes
1 answer

From what information is EF4 Code first building the conceptual model

As I understand Code First is building a model to work with EF4 in memory and where you can fine tune your mappings and stuff. Based on what information is this model being build? You see I have an existing application and am looking to change our…
adriaanp
  • 2,064
  • 2
  • 22
  • 40
0
votes
1 answer

Base classes and parent/child relations in Entity Framework Code First

Hi I've run into a problem with Parent/Child Relations between abstract baseclasses and their implementations public class SuperParent { public ICollection ParentList { get; set; } } public abstract class Parent { public int Id {…
Garret
  • 11
  • 2
0
votes
1 answer

How to add a table to the EF4 Context dynamically in code - No Code First

We run a series of reports every 6 months and store the results to tables that can be queried/viewed at any time in the future. Depending on the cycle either two or four tables will be added. They have a standard naming convention of…
Matt Penner
  • 1,082
  • 12
  • 22
0
votes
1 answer

What's wrong with this ASP.net MVC system design?

I have a ASP.Net MVC 3 photo gallery, which is designed in this way: Data Repositories(IImageRepoSitory, ITagRepository etc) | Services (IGalleryService, IWebService etc) | Web Application Which I use Ninject to inject the required…
xandy
  • 27,357
  • 8
  • 59
  • 64
0
votes
1 answer

WCF Data services & EF4 CTP5, how to configure default eager loading schemas for queries?

Project: Exposing via OData (Wcf Data services) an Entity Framework ObjectContext configured by code-first approach. Everything works fine for simple queries and CUD operations. However, I can't see how to configure default schema loading(server…
0
votes
2 answers

EF CTP 5 create and persist object graph trouble

Code: Something smt = new Something(){ Prop = 123, Prop2 = "asdad" } foreach(var related in relatedsomething) { smt.Related.Add(new Related(){ relatedprop = 123, }; } Runtime gives me an error about null reference. Related is virtual…
Alexander Taran
  • 6,655
  • 2
  • 39
  • 60
0
votes
1 answer

EF Code First "Transactional Issue"

Using the latest EF Code First CTP in an asp.net web app, I seem to have run into an issue. Please excuse the lack of code (for now) but I'll try to explain well. In my controllers, I am injecting a repository factory and an IDataContext via my DI…
nick
  • 1,477
  • 2
  • 20
  • 29
0
votes
1 answer

Register generic type in DbContext EF4 CTP5

in EF4 CTP4 we had RegisterSet function to generically register entity in ModelBuilder. We used Configurations.Add() to register the mapping for entities. How to achieve this EF4 CTP 5
Abhay Naik
  • 410
  • 3
  • 15
0
votes
1 answer

EF4 Code Only - Map Columns to Property Complex type

I have a table like this: Name Tree Iron Clay Added I want to map it to a model like this: Name Resources Tree Iron Clay Added In makes sense to map it like this, when working with it in my program, but doing it that way in the databse would…
Syska
  • 1,150
  • 7
  • 26
0
votes
1 answer

Code First CTP4 for EF4 - how to map multiple entities (common base) to single table

I have a large table that I want to map to a few entities. Say the table looks like this: Thing(ThingId, Property1...Property20) Now I have my entities: public abstract class ThingBase { public int ThingId { get; set; } public string…
Paul Hiles
  • 9,558
  • 7
  • 51
  • 76
1 2 3 4 5
6