entity

Best way to implement a dirty flag in EF

You can easily use the PropertyChanges events to set the flag but how do you easily reset it after a save to the ObjectContext? ...

How to compare html entity with JQuery

I have the next html code <h3 id="headerid"><span onclick="expandCollapse('headerid')">&uArr;</span>Header title</h3> I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with .text() too if(arrow...

.NET XmlDocument LoadXML and Entities

When loading XML into an XmlDocument, i.e. XmlDocument document = new XmlDocument(); document.LoadXml(xmlData); is there any way to stop the process from replacing entities? I've got a strange problem where I've got a TM symbol (stored as the entity #8482) in the xml being converted into the TM character. As far as I'm concerned this...

Recommendations for good book and/or online documentation for Entity Relationship Diagrams

Hi there, The wiki page on ERD has a lot of useful information, but I was wondering if you had any recommendations for good books and/or online documentation for a more in-depth description of ERD's? Thanks. ...

Entity Perspectives

Context: So, I am attempting to build a ridiculously complex domain model. Talking with the users, there are multiple ways the system will be used (For example: one way is from the perspective of the employee; another way is from the perspective of the employer). In actuality, they are multiple applications reusing the core domain. ...

Retrieving Attribute names of an Entity in MS CRM 4.0

I am back again with another question on ms crm. The latest thing i am trying to do is retrieve the attribute name and type that exist in an entity, Dynamic Entity to be precise. I have the following code. DynamicEntity contactEntity = new DynamicEntity(); contactEntity.Name = EntityName.contact.ToString(); Property t = nu...

How would you approach, in .NET, allowing the tenants of a multi-tenant SaaS app to arbitrarily add properties to the entities of the model?

So, we're building a multi-tenant system to run as a service. We're starting from the ground up. We're following DDD; the domain has (at the moment) ~20 entities in it, and later there will be more. It is to be hosted by us, geographically redundant (n+1 of everything except SQL queries ;-) ), and of flexible design (well, that last ...

How to deal with a Many-To-Many Relation in my API

I have two entities Foo and Bar with a Many to Many relationship between them. Let's say there is no semantic argument for why Foo might be "responsible" for the many to many relationship, but we arbitrarily decide that Foo is responsible for the relation (I.e., in NHibernate we would mark Bar as Inverse) That's all well and good from ...

Automatic entity mapping similar to O/R-mapping with JSF?

With JPA I do not need to code the SQL for every new attribute as the o/r-mapping is being done automatically. As I am new to JSF, i am wondering whether there is a similar possiblity with JSF? I do not want to add new code to a jsf datatable every time I change something at the corresponding entity. ...

Can Spring Webflow 2.0's entity manager commit from subflow states?

Hello. My team and I are currently starting up a project using Spring 2.5.6 and Spring Webflow 2.0 (JDK 1.4.2). We're in the design phase right now, and I would like to know whether or not Spring's Persistence context/entity manager (we're going to use Hibernate) can commit from subflows. The commit attribute is only available from th...

Best Entity framework documentation?

Where is the best documentation to learn how to read this line? The MSDN reference pages are extremely terse as usual. What is the effect of adding Include("Course")? What does "it" mean in "it.Name"? Why wouldn't you specify just "Name"? ObjectQuery departmentQuery = schoolContext.Department.Include("Course").OrderBy("it.Name"); ...

Entity objects getters and setters for data properties

I recently started working in Java and was introduced to the wild and crazy world of getters and setters for everything. I hated it at first, but quickly got used to it. Too used to it. I have been spending a lot of time lately thinking more about class design. One of the things I am trying to do is avoid the trap of doing getters and s...

Does this Entity Repository Service example fit into Domain-Driven Design?

I would like to know if you find the following pattern meaningful in domain driven design. The domain layer consists of model and repository. The application layer consists of services that handles queries from the user interface, or from controllers in the Model-View-Controller pattern. Details of the structure: // Assembly Model: p...

DTD Entities in config file

I am trying to use entity definitions in a config file to simplify the differences between the development, QA, UAT and production versions. Here is a sample of the beginning of my config file: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE configuration [ <!ENTITY MyStorageLocation "\\MyServer\MyStorageFolder"> <!ENTITY MyDa...

XML Entity for "/" ?

So I'm writing some XML generating code, and found that the following attribute value was screwing up the XML formatting: "Jim/Bob" So I looked into the XML Entities used as escape sequences and every list I saw did not include one for the forward slash. Am I missing something obvious here? Seems like the sort of thing you'd want to ...

TDD with Entity, mocking the generated Entity classes?

My apologies, I read this post: http://stackoverflow.com/questions/316897/tdd-and-ado-net-entity-framework But I don't think it covers what I'm looking for and other similar questions seem unanswered. So, forgive me if this has already been answered. I have an application that I'm writing. I've created some Entity classes. I want to m...

Entity Framework - Only updates the first char of the data table columns fields

I've just recently been using the EF just because I thought it was simplier and faster to have a DAL that way...but it's a pain in the ....s After solving severam problems I can't sucessfully updade dada from my tables in a sql database. I have a aspx form that edits some fieds in the entity object (System.Data.Objects.DataClasses.Enti...

Entity constructors - Entity framework

I'm trying to find the best way to work with objects in entity framework. I don't want my forms to know anything about ObjectContext, so I put all the logic inside the entities (I write partial classes). I've been looking for others experiences a lot and haven't find this approach anywhere. So, how do you work? How do you get an object f...

How to resolve all entity references in XML and create a new XML in C#?

How can I resolve all entity references in the XHTML document and convert it to plain XHTML document that IE can understand? The example XHTML: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html [ <!ENTITY D "&#x2014;"> <!ENTITY o "&#x2018;"> <!ENTITY c "&#x2019;"> <!ENTITY O "&#x201C;"> <!ENTITY C "&#x201D;"> ]> ...

Data Transfer Objects and Entity Framework

Hi, I am working on a 3-tier web application where I am using the microsoft Entity Framework. To make a loose coupling between the different layers I using data transfer objects to transfer between the Entity Framework objects and my custom objects, but I have a problem with the speed of translating between the entity framework and my cu...