code-first Questions
1
I am trying to set a static cacheControl on some fields, as done here
From my understanding, I need to use a directive, so I used the following nest documentation to declare directives
So, I built ...
Shaum asked 20/6, 2022 at 7:15
3
Solved
I try to execute command update-database in PMC and always get this error msg. I know theres another article basically has the same error but i tried every answer and nothing works.
System.Argument...
Boley asked 14/9, 2021 at 1:28
12
Solved
I am trying to do this:
ALTER TABLE CompanyTransactions DROP COLUMN Created
But I get this:
Msg 5074, Level 16, State 1, Line 2
The object 'DF__CompanyTr__Creat__0CDAE408' is dependent on co...
Marinemarinelli asked 21/4, 2017 at 18:11
3
I am using Entity-Framework in a Winforms application. The application connects to MSSQLServer and everything works fine. Then I detach the database and copy the .mdf file to the app folder and cha...
Nagey asked 11/12, 2018 at 10:15
30
Solved
I use code-first in my project and deploy on host but I get error
CREATE DATABASE permission denied in database 'master'.
This is my connection string:
<add name="DefaultConnection"
conn...
Ashok asked 27/6, 2012 at 17:34
13
Solved
I have a model class named Foo that has, among others, these properties.
public string StripeRecipientId { get; set; }
public override bool HasProvidedBillingInformation
{
get
{
// return !str...
Bearish asked 29/9, 2015 at 13:31
5
Solved
I'm creating a POCO model to use with entity framework code first CTP5. I'm using the <key()> decoration to make a property map to a PK column. But how can I define a PK on more then one colu...
Steersman asked 9/2, 2011 at 20:45
8
Solved
Using Entity Framework 4 CTP5 Code First and this example
Is it possible to access the discriminator value?
I would like to use it in a projection like
context.BillingDetails.Select(x => new ...
Fortier asked 24/12, 2010 at 11:6
6
Solved
How do I specify ON DELETE NO ACTION Foreign Key Constraint in my model designs?
At present, I have:
public class Status
{
[Required]
public int StatusId { get; set; }
[Required]
[DisplayNam...
Melanite asked 13/10, 2012 at 0:41
10
Solved
I see this a lot in tutorials, with navigation properties as ICollection<T>.
Is this a mandatory requirement for Entity Framework? Can I use IEnumerable?
What's the main purpose of using IC...
Obligate asked 11/4, 2012 at 20:14
19
Is it possible to have Entity Framework (I am using the Code First Approach with CTP5 currently) store all DateTime values as UTC in the database?
Or is there maybe a way to specify it in the mapp...
Freakish asked 10/1, 2011 at 15:44
5
Solved
Is there a way to decorate your POCO classes to automatically eager-load child entities without having to use Include() every time you load them?
Say I have a Class Car, with Complex-typed Proper...
Danseur asked 24/1, 2013 at 22:49
9
Solved
I am trying to implemente code First Migrations with Oracle.ManagedDataAccess 6.121.1.0 provider, but with no success at all.
As I am receiving a ORA-code, I am assuming that the connection are be...
Arther asked 2/12, 2014 at 13:22
2
Solved
How can I execute a scalar function using code first? Below is what I have tried but only the query itself is being returned, not the return value.
using (var dbContext = new FTTRContext())
{
...
Hack asked 3/6, 2014 at 1:47
4
Solved
In my project I am creating the Appointments table using Entity Framework code first. When I set my integer primary key, AppointmentNo as [Key] and [Required], it creates the table with initial pri...
Opec asked 17/9, 2018 at 19:3
6
Solved
I have following classes and DbContext:
public class Order : BaseEntity
{
public Number {get; set;}
}
public class Product : BaseEntity;
{
public Name {get; set;}
}
public class Context : DbCon...
Inrush asked 3/2, 2014 at 17:19
4
Solved
I have two tables a parent and a child table. The child table has a column sortorder (a numeric value). Because of the missing support of the EF to persist a IList inclusive the sort order without ...
Geanticline asked 30/3, 2012 at 7:50
5
Solved
So here's the scenario:
DDD states that you use a repository to get the aggregate root, then use that to add/remove to any collections it has.
Adding is simple, you simple call .Add(Item item) on...
Preconcert asked 2/12, 2011 at 17:29
3
Solved
My Seed() method is never called. It is called when I do an Update-Database from the Package Manager Console, but never when I run from code.
If I delete my database, all tables are created ( so my...
Shoeblack asked 9/11, 2012 at 19:41
2
Solved
I am working with a system that is using EF code first and I would like to use a number of SQL Server sparse columns on a table. My current solution is to drop the table created by EF and re-add vi...
Indium asked 12/4, 2012 at 12:54
7
Solved
I've just started using EF code first, so I'm a total beginner in this topic.
I wanted to create relations between Teams and Matches:
1 match = 2 teams (home, guest) and result.
I thought it's ...
Breastplate asked 5/4, 2011 at 21:57
1
Solved
How can I get a field of type array that allows nullable values when using the code-first approach in nestjs graphql.
The example shows that
@Field(type => [String])
ingredients: string[];
ge...
Chapbook asked 18/6, 2021 at 1:47
5
Solved
I have what should be an easy question but I have been unable to find the answer myself.
I am using EF4 CTP-5 Code First Model with hand generated POCOs. It is processing string comparisons in gen...
Mcfarlin asked 24/2, 2011 at 18:58
9
Solved
I am using Entity Framework Code First method to create my database table. The following code
creates a DATETIME column in the database, but I want to create a DATE column.
[DataType(DataType.Da...
Topic asked 14/4, 2011 at 3:30
2
I had Asp.net core and gRPC working on the browser...but now I get:
info: Grpc.AspNetCore.Server.ServerCallHandler[2]
Request content-type of 'application/grpc-web' is not supported.
Any ideas on...
Greyhen asked 4/12, 2020 at 2:7
1 Next >
© 2022 - 2024 — McMap. All rights reserved.