entity-relationship

how to setup this diagram? (multiple selling methods)

夙愿已清 提交于 2020-06-01 07:38:20
问题 I'm supposed to create a sort of second brand website. When someone wants to sell a product, he has the option to sell it for: a set amount free to bid can anyone give me an assist on how to continue? This is what i have so far, but i'm stuck and don't know how to continue. (sorry for the use of native language, the entities are : member, seller (top one) buyer (bottom one) and products, in that order. any form of help is appreciated! 回答1: I really don’t know where your problem is but I would

ER-Diagram: Ternary Relationship - How to read properly?

一个人想着一个人 提交于 2020-02-17 07:37:10
问题 Im not quite sure how to read ternary relationships within a ER-Diagram. Lets say this is the ternary relationship that is given. What can I interpret out of that? It says that you have to put your hand on 2 entity sets and then read it like that. Hand on Account and User: A pair of Account and User can be associated with M projects. Hand on Account and Project: A pair of Account and Project can be associated with M users. Hand on Project and User: A pair of Project and User can be associated

Map a navigation property to a instance var as Foreign key

夙愿已清 提交于 2020-02-02 12:30:10
问题 I'm developing an Entity Framework Code First (v. 4.4.0.0) C# library with .Net Framework 4.0. I don't know how to set zero-to-one relationship. My model is the following: A Talk can be created by only one user ( StarterUserId ). A Talk can have only one recipient user ( RecepientUserId ) or only one group ( RecipientGroupId ). Note : That means that RecepientUserId is null if RecipientGroupId is not null; or RecepientUserId is not null if RecipientGroupId is null. A user can be a recipient

Core data: Managing employee contracts in a many-to-many relationship?

此生再无相见时 提交于 2020-01-30 03:55:30
问题 I am mapping an idea for a relationship using Core Data. I have an Employer entity who has a many-to-many relationship with Employees . Basically, an employee can work for multiple employers, and an employer can have multiple employees. The problem I'm facing is, I'm not sure how to manage the contracts between employees and employers. As an employee can work for either 1 or many employers, they would naturally have a contract for each employer they work for (complete with salary, duration)

Implementing Zero Or One to Zero Or One relationship in EF Code first by Fluent API

别来无恙 提交于 2020-01-26 08:46:35
问题 I have two POCO classes public class Order { int id; string code; int? quotationId; //it is foreign key public int Id{get;set;} public string Code{get;set;} public int? QuotationId{get;set;} Quotation quotation; public virtual Quotation Quotation { get; set; } .... } public class Quotation { int Id; string Code; public int Id{get;set;} public string Code{get;set;} Order order; public virtual Order Order { get; set; } .... } each Order may made from one or zero quotation, and each quotation

Implementing Zero Or One to Zero Or One relationship in EF Code first by Fluent API

青春壹個敷衍的年華 提交于 2020-01-26 08:46:07
问题 I have two POCO classes public class Order { int id; string code; int? quotationId; //it is foreign key public int Id{get;set;} public string Code{get;set;} public int? QuotationId{get;set;} Quotation quotation; public virtual Quotation Quotation { get; set; } .... } public class Quotation { int Id; string Code; public int Id{get;set;} public string Code{get;set;} Order order; public virtual Order Order { get; set; } .... } each Order may made from one or zero quotation, and each quotation

Abstract Class from UML to ER diagram. Possible ? How?

梦想与她 提交于 2020-01-25 00:13:29
问题 I have the below UML class diagram with Abstract Class, and sub-Classes that extends from it. and i want to make an ER diagram using this class diagram. My question is how can i represent the Abstract class in ER diagram ? as a Table ? or should i just ignore it ? Thank you. 回答1: There are basically three choices to translate generalization into a database model 1. One table per concrete class Create tables Admin , Teacher and Student . Each of these table contain columns for all of the

Entity Framework - relationship with fake Foreign Key (no foreign key in the db)

南楼画角 提交于 2020-01-22 14:14:28
问题 I have many tables that have TextID column which refers to the translation table. Translation table needs also LanguageID to get translated text in desired language. My problem is that I do not have LanguageID in my database, it is predefined in the system and I do not know how can I define it using Fluent API, i.e this can be my model: public partial class MyEntity { public short ID { get; set; } public Nullable<int> TextID { get; set; } [NotMapped] public Nullable<int> LanguageID { get; set

Entity Framework - relationship with fake Foreign Key (no foreign key in the db)

若如初见. 提交于 2020-01-22 14:13:45
问题 I have many tables that have TextID column which refers to the translation table. Translation table needs also LanguageID to get translated text in desired language. My problem is that I do not have LanguageID in my database, it is predefined in the system and I do not know how can I define it using Fluent API, i.e this can be my model: public partial class MyEntity { public short ID { get; set; } public Nullable<int> TextID { get; set; } [NotMapped] public Nullable<int> LanguageID { get; set

EF 4.3 CF does not update relationships when saving changes

Deadly 提交于 2020-01-17 12:27:09
问题 I've got a ClubItem object with a relationship collection ICollection ClubUsers. I load a ClubItem from the context and add a couple of new users to the CluItem. When saving the ClubItem in a disconnected state the context does not see the new ClubUsers as new entities. How to tell the context that something changed? I allready use this to change entitystate of the ClubItem: public virtual void Update(IEntity entityToUpdate) { DbSet.Attach(entityToUpdate); Context.Entry(entityToUpdate).State