ef4-code-only Questions
5
Solved
I have an object that has a char property:
public class Product
{
public char Code
{
get;
set;
}
}
Entity Framework doesn't seem to be able to map chars (this field is missing from the data...
Isomorph asked 20/7, 2011 at 10:55
5
Solved
I've using Entity Framework CTP5 in "code only" mode. I'm running a LINQ query on a object that was return from the database, as the query is running really slowly. Is there any way in which I can ...
Closestool asked 1/3, 2011 at 11:19
2
I've got an EF4 entity (code-first) that includes an int bitmask. I've created a Bitmask struct to make working with bitmasks easier (provides bool properties to access the bits). The bitmask struc...
Ultrasonic asked 13/1, 2011 at 1:6
5
Solved
How do I make non persisted properties using codefirst EF4?
MS says there is a StoreIgnore Attribute, but I cannot find it.
http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-...
Scrofulous asked 29/8, 2010 at 15:45
5
Solved
Traditionally I have always written my sql scripts by hand so they are nice and clean (I'm not a fan of the generated ones) and release to release, I provide a fresh install script and a migration ...
Dapplegray asked 18/11, 2010 at 3:6
2
I'm converting my EF POCO project to Code first. I had changed the T4 template, so that all my entities use a base class, EntityBase, that provides them with some common functionality that is not p...
Sublimate asked 27/8, 2012 at 12:5
3
Solved
I would like to use SQL Server xml type as a column type for an entity class.
According to this thread it's possible to map such a column to string type:
public class XmlEntity
{
public int Id {...
Tevis asked 25/8, 2011 at 12:52
3
Solved
I have a database and I am using two different schemas. Schemas are like namespaces (correct me if I am wrong). This way I have one database and currently two schemas, so the tables in one schema c...
Parke asked 30/1, 2011 at 8:4
2
Solved
I have this class and table:
public class Foo
{
public Guid Id {get;set;}
public string Name {get;set;}
}
create table Foo
(
id uniqueidentifier primary KEY DEFAULT (newsequentialid()),
name ...
Oratorical asked 11/3, 2011 at 8:41
1
Solved
I have a table that has a unique index on a table with an Ordinal column. So for example the table will have the following columns:
TableId, ID1, ID2, Ordinal
The unique index is across the colum...
Goldie asked 7/9, 2011 at 14:27
1
Solved
I am trying to implement a caching pattern which may need to utilise Redis. The problem with this pattern is that I need to disable Configuration.ProxyCreationEnabled and then re-enable it afterwar...
Diskin asked 5/9, 2011 at 15:33
1
Solved
I'm trying to understand how to use WCF Data Services (based on EF 4.1) to create a restful web service that will persist entities passed as JSON objects.
I've been able to create a method that ca...
Iamb asked 2/8, 2011 at 19:19
3
Solved
What are the best practices for database refactoring with codefirst EF4?
I am interested to hear how people change the classes and the database when the RecreateDatabaseIfModelChanges option is n...
Obligate asked 29/8, 2010 at 1:31
0
I'm wokring on building dataAcess layer for my application I'm using EF4 Self tracking entities I build entities quit well now I have to seprate self entities to their files so I can use for N tier...
Glendaglenden asked 17/4, 2011 at 4:43
2
Solved
How can I add an Image type to an EF4 Code First Entity? I need to add a column for thumbnail images.
public Image Thumbnail { get; set; }
Thanks!
Eliason asked 11/11, 2010 at 16:5
1
Okay, this should be really easy, but I've been tearing my hair out. Here's my POCO (which has to do with machine parts, so a part can be contained within a parent part):
public class Part
{
publ...
Steeplejack asked 6/1, 2011 at 5:32
1
Solved
By code-first approach (but with an existing db schema), we are trying to map 2 different entities (Customer and Resource) to the same table. Both entities has the same keys and mapping.
However, ...
Lorenza asked 15/1, 2011 at 16:37
1
Solved
Given this sql schema:
create table [dbo].[Courses_Students] (
[DummyColumn] [int] null,
[CourseId] [int] not null,
[StudentId] [int] not null,
primary key ([CourseId], [StudentId])
);
How d...
Tarah asked 8/11, 2010 at 13:7
1
Solved
How can you map an entity to a database view with EF 4 code first?
Is there a way to do this by deriving from the EntityConfiguration classes?
Chaves asked 29/8, 2010 at 17:24
1
© 2022 - 2024 — McMap. All rights reserved.