Search Results

Search found 43366 results on 1735 pages for 'entity attribute value'.

Page 10/1735 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Entity Framework 4 and SQL Compact 4: How to generate database?

    - by David Veeneman
    I am developing an app with Entity Framework 4 and SQL Compact 4, using a Model First approach. I have created my EDM, and now I want to generate a SQL Compact 4.0 database to act as a data store for the model. I bring up the Generate Database Wizard and click the New Connection button to create a connection for the generated file. The Choose Data Source dialog appears, but SQL Compact 4.0 is not listed in the list of available data sources: I am running VS 2010 SP1 (beta) and I have installed the VS 2010 Tools for SQL Compact 4.0. I can create a SQL Compact 4.0 data connection from the Server Explorer. It is only in the Generate Database Wizard that the 4.0 option doesn't appear. BTW, my SQL Compact 4.0 installation does include System.Data.SqlServerCe.Entity.dll. So I should have the SQL Compact components I need. Am I doing something incorrectly, or is this a bug? Does anyone have a fix or a workaround? Thanks for your help.

    Read the article

  • Add Attribute (System.Attribute variety) to .aspx page - not the code-behind

    - by Macho Matt
    I am creating a custom Attribute (extending System.Attribute). I know I can put it on another class easily enough by doing the following. [MattsAttribute] public class SomeClassWhichIsACodeBehind { However, I need to be able to test this attribute easily, and putting it in the code-behind would cause a lot of extra effort to get it deployed to an environment which would respond to the behavior of attribute. What I would like to do: declaratively apply this attribute to the .aspx page itself (which is really just another class that inherits from the code-behind). Is this possible? If so, what is the proper syntax for doing this?

    Read the article

  • In an Entity-Component-System Engine, How do I deal with groups of dependent entities?

    - by John Daniels
    After going over a few game design patterns, I have settle with Entity-Component-System (ES System) for my game engine. I've reading articles (mainly T=Machine) and review some source code and I think I got enough to get started. There is just one basic idea I am struggling with. How do I deal with groups of entities that are dependent on each other? Let me use an example: Assume I am making a standard overhead shooter (think Jamestown) and I want to construct a "boss entity" with multiple distinct but connected parts. The break down might look like something like this: Ship body: Movement, Rendering Cannon: Position (locked relative to the Ship body), Tracking\Fire at hero, Taking Damage until disabled Core: Position (locked relative to the Ship body), Tracking\Fire at hero, Taking Damage until disabled, Disabling (er...destroying) all other entities in the ship group My goal would be something that would be identified (and manipulated) as a distinct game element without having to rewrite subsystem form the ground up every time I want to build a new aggregate Element. How do I implement this kind of design in ES System? Do I implement some kind of parent-child entity relationship (entities can have children)? This seems to contradict the methodology that Entities are just empty container and makes it feel more OOP. Do I implement them as separate entities, with some kind of connecting Component (BossComponent) and related system (BossSubSystem)? I can't help but think that this will be hard to implement since how components communicate seem to be a big bear trap. Do I implement them as one Entity, with a collection of components (ShipComponent, CannonComponents, CoreComponent)? This one seems to veer way of the ES System intent (components here seem too much like heavy weight entities), but I'm know to this so I figured I would put that out there. Do I implement them as something else I have mentioned? I know that this can be implemented very easily in OOP, but my choosing ES over OOP is one that I will stick with. If I need to break with pure ES theory to implement this design I will (not like I haven't had to compromise pure design before), but I would prefer to do that for performance reason rather than start with bad design. For extra credit, think of the same design but, each of the "boss entities" were actually connected to a larger "BigBoss entity" made of a main body, main core and 3 "Boss Entities". This would let me see a solution for at least 3 dimensions (grandparent-parent-child)...which should be more than enough for me. Links to articles or example code would be appreciated. Thanks for your time.

    Read the article

  • Javascript: td value == td value

    - by Isis
    Hello <tr> <td class = "nowrap cr" id="cr1">123123</td> <td class = "nowrap ch" id="ch1">123123</td> </tr> <tr> <td class = "nowrap cr" id="cr2">123123</td> <td class = "nowrap ch" id="ch2">123123</td> </tr> <tr> <td class = "nowrap cr" id="cr3">123123</td> <td class = "nowrap ch" id="ch3">123123</td> </tr> How do I set the font-weight: bold in tr where chID == crID <script type="text/javascript"> $(function() { for(var i =0;i < 20;i++) { if($('#cr'+i).val() == $('#ch'+i).val()) { $('#cr'+i).parent().css('font-weight', 'bold'); } } }); </script> Dont' working. Any ideas? Sorry for bad english

    Read the article

  • Is Moving Entity Framework objects over a webservice really the best way?

    - by aceinthehole
    I've inherited a .NET project that has close to 2 thousand clients out in the field that need to push data periodically up to a central repository. The clients wake up and attempt to push the data up via a series of WCF webservices where they are passing each entity framework entity as parameter. Once the service receives this object, it preforms some business logic on the data, and then turns around and sticks it in it's own database that mirrors the database on the client machines. The trick is, is that this data is being transmitted over a metered connection, which is very expensive. So optimizing the data is a serious priority. Now, we are using a custom encoder that compresses the data (and decompresses it on the other end) while it is being transmitted, and this is reducing the data footprint. However, the amount of data that the clients are using, seem ridiculously large, given the amount of information that is actually being transmitted. It seems me that entity framework itself may be to blame. I'm suspecting that the objects are very large when serialized to be sent over wire, with a lot context information and who knows what else, when what we really need is just the 'new' inserts. Is using the entity framework and WCF services as we have done so far the correct way, architecturally, of approaching this n-tiered, asynchronous, push only problem? Or is there a different approach, that could optimize the data use?

    Read the article

  • Dump Linq-To-Sql now that Entity Framework 4.0 has been released?

    - by DanM
    The relative simplicity of Linq-To-Sql as well as all the criticism leveled at version 1 of Entity Framework (especially, the vote of no confidence) convinced me to go with Linq-To-Sql "for the time being". Now that EF 4.0 is out, I wonder if it's time to start migrating over to it. Questions: What are the pros and cons of EF 4.0 relative to Linq-To-Sql? Is EF 4.0 finally ready for prime time? Is now the time to switch over?

    Read the article

  • Flexible design - customizable entity model, UI and workflow

    - by Ngm
    Hi All, I want to achieve the following aspects in the software I am building: 1. Customizable entity model 2. Customizable UI 3. Customizable workflow I have thought about an approach to achieve this, I want you to review this and make suggestions: Entity objects should be plain objects and will hold just data Separate Entity model and DB Schema by using an framework (like NHibernate?). This will allow easy modification of entity objects. Business logic to fetch/modify entities has to be granular enough so that they can be invoked as part of the workflow. Business objects should not hold any state, and hence will contain only static methods The workflow will decide depending upon the "state" of an entity/entities which methods on business object/objects to invoke. The workflow should obtain the results of the processing and then pass on the business objects to the appropriate UI screen. The UI screen has to contain instructions about how to display a given entity/entites. Possibly the UI has to be generated dynamically based on a set of UI instructions. (like XUL) What do you think about this approach? Suggest which existing frameworks (like NHiberante, Window Workflow) fit into this model, so that I will not spend time on coding these frameworks Also suggest is there any asp.net framework that can generate dynamic asp.net ajax pages based on a set of UI instructions (like Mozilla XUL)? I have recently been exploring Apache Ofbiz and was impressed by its ability to customize most areas of the application: UI, workflow, entities. Is there any similar (not necessarily an ERP system) application developed in C#/.Net which offers a similar level of customization? I am looking for examples of applications developed in C# that are highly customizable in terms of UI, Workflow and Entity Model

    Read the article

  • What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF?

    - by hal9k2
    As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement model to viewModel, but models in that examples are just simple classes, I want to use MVVM together with entity framework model (base first approach). Whats the best way to wire model to viewModel. Thanks for answers. //ctor of ViewModel public ViewModel() { db = new PackageShipmentDBEntities(); // Entity Framework generated class ListaZBazy = new ObservableCollection<Pack>(db.Packs.Where(w => w.IsSent == false)); } This is my usual ctor of ViewModel, think there is a better way, I was reading about repository pattern, not sure if I can adapt this to WPF MVVM

    Read the article

  • 2-Way databinding with Entity Framework and WPF DataGrid

    - by Mike Gates
    I'm having trouble adding an Entity Framework entity to a ObjectContext's EntitySet automatically using the WPF 4.0 DataGrid's add functionality. Here's the setup: DataGrid--BoundTo--ListCollectionView--BoundTo--EntitySet When I interactively add a row to the DataGrid, the EntitySet does not have a new entity added to it. Updating the row's cell data does in fact update the bound entity's properties, however. Any idea what I could be doing wrong?

    Read the article

  • Java Netscape LDAP Remove One Attribute

    - by spex
    Hi, I have LDAP schema where are users. I need remove one attribute named "notify" which have values: phone number or mail or remove attribute from user. I found method LDAPConnection myCon = new LDAPConnection("localhost",389); myCon.delete("uid=test1, ou=People, o=domain.com, o=isp"); but this remove whole user and i need remove only one attribute "notifyTo" of this user. I need remove whole attribute not only its value. Thanks for reply

    Read the article

  • Entity Framework 4 - Delay Loading Expensive Fields

    - by JohnnyO
    I know this same question was asked for Entity Framework 1, but now that Entity Framework 4 has come out, and Microsoft claims that it provides all of the features of Linq to Sql + more, does Entity Framework now support lazy loading expensive properties? In Linq to Sql, this is extremely easy. There's a Delay Loaded option on any property (accessible through the Designer) that can simply be toggled on or off. Is there something similar in Entity Framework? Thanks

    Read the article

  • How to model my database when using entity framework 4?

    - by Junior Ewing
    Trying to wrap my head around the best approach in modelling a database when we are using Entity Framework 4 as the ORM layer. We are going to use asp.net mvc 2 for the application. Is it worth trying to model using the class diagram modeller that comes with Visual Studio 2010 where you graphically configure your models into the EDMX file and then generate out the database structure? I have run into a bunch of non trivial issues and for complex many to many mappings or multi primary key entities the answer is not that obvious even after poking around a while with the tools. I figure its easy at this point to give up and start modelling the DB using real, working DB modelling tools and then try to generate out the EDMX from the database, rather than trying to do the model first approach.

    Read the article

  • Entity Framework 4 - Handling very large (1000+ tables) data models?

    - by David Kreps
    We've got a database with over 1000+ tables and would like to consider using EF4 for our data access layer, but I'm concerned about the practical realities of using it for such a large data model. I've seen this question and read about the suggested solutions here and here. These may work, but appear to refer to the first version of the Entity Framework (and are more complex than I'd like). Does anyone know if these solutions have been improved upon in EF4? Or have other suggestions all together? Thanks.

    Read the article

  • Obstacle Avoidance steering behavior: how can an entity avoid an obstacle while other forces are acting on the entity?

    - by Prog
    I'm trying to implement the Obstacle Avoidance steering behavior in my 2D game. Currently my approach is to apply a force on the entity, in the direction of the normal of the heading, scaled by a number that gets bigger the closer we are to the obstacle. This is supposed to push the entity to the side and avoid the obstacle that blocks it's way. However, in the same time that my entity tries to avoid an obstacle, it Seeks to a point more or less behind the obstacle (which is the reason it needs to avoid the obstacle in the first place). The Seek algorithm constantly applies a force on the entity that pushes it (more or less) in the direction of the obstacle, while the Obstacle Avoidance algorithm constantly applies a force that pushes the entity away (more accurately, to the side) of the obstacle. The result is that sometimes the entity succesfully avoids the obstacle, and sometimes it collides with it, depending on the strength of the avoidance force I'm applying. How can I make sure that a force will succeed in steering the entity in some direction, while other forces are currently acting on the entity? (And while still looking natural). I can't allow entities to collide with obstacles when realistically they should be able to easily avoid them, doesn't matter what they're currently doing. Also, the Obstacle Avoidance algorithm is made exactly for the case where another force is acting on the entity. Otherwise it wouldn't be moving and there would be no need to avoid anything. So maybe I'm missing something. Thanks

    Read the article

  • 2-Way databinding with Entity Framework and WPF DataGrid , is Possible ?

    - by Panindra
    i am working on POS application using SQL CE , WPF , Entity framework 3.5sp2 and iam trying to use data grid as my Order Entry Control for User to enter Products Order . Iam plannning to bind this to enitiy frmae work model , abd looking for 2 way updating ? private void button1_Click(object sender, RoutedEventArgs e) { using (MasterEntities nwEntities = new MasterEntities()) { var users = from d in nwEntities.Companies select new { d.CompanyId, d.CompanyName, d.Place }; listBox1.DataContext = users; dataGrid1.DataContext = users; // foreach (String c in customers) // { // MessageBox.Show(c.ToString()); // } } } When try to double clikc on the datagrid it through s a error with Caption " Invalid Operation Execption was unhandled " and Message " A TwoWay or OneWayToSource binding cannot work on the read-only property 'CompanyId' of type '<f__AnonymousType0`3[System.Int32,System.String,System.String]'. whats wrong here and my xaml coding goes like this <Grid> <ListBox Name="listBox1" ItemsSource="{Binding}" /> <Button Content="Show " Name="button1" Click="button1_Click" /> <DataGrid AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding}" > <DataGrid.Columns> <DataGridTextColumn Header=" ID" Binding="{Binding CompanyId}"/> <DataGridTextColumn Header="Company Name" Binding="{Binding CompanyName}"/> <DataGridTextColumn Header="Place" Binding="{Binding Place}" /> </DataGrid.Columns> </DataGrid> </Grid> EDITED : i made the changes shown by @vorrtex, But, then i added another button to save the chages and in button click event i added follwing code , butit showing Updating error private void button2_Click(object sender, RoutedEventArgs e) { nwEntities.SaveChanges(); }

    Read the article

  • A question about entities, roles and interfaces in Entity Framework 4.

    - by mvole
    Hi, I am an experienced .NET developer but new to EF - so please bear with me. I will use an example of a college application to illustrate my problem. I have these user roles: Lecturer, Student, Administrator. In my code I envisage working with these entities as distinct classes so e.g. a Lecturer teaches a collection of Students. And work with 'is Student' 'TypeOf' etc. Each of these entities share lots of common properties/methods e.g. they can all log onto the system and do stuff related to their role. In EF designer I can create a base entity Person (or User...) and have Lecturer, Student and Administrator all inherit from that. The difficulty I have is that a Lecturer can be an Administrator - and in fact on occasion a Student can be a Lecturer. If I were to add other entities such as Employee and Warden then this gets even more of an issue. I could presumably work with Interfaces so a person could implement ILecturer and IStudent, however I do not see how this fits within EF. I would like to work within the EF designer if possible and I'm working model-first (coding in C#). So any help and advice/samples would be very welcome and much appreciated. Thanks

    Read the article

  • Entity Framework LINQ Query using Custom C# Class Method - Once yes, once no - because executing on the client or in SQL?

    - by BrooklynDev
    I have two Entity Framework 4 Linq queries I wrote that make use of a custom class method, one works and one does not: The custom method is: public static DateTime GetLastReadToDate(string fbaUsername, Discussion discussion) { return (discussion.DiscussionUserReads.Where(dur => dur.User.aspnet_User.UserName == fbaUsername).FirstOrDefault() ?? new DiscussionUserRead { ReadToDate = DateTime.Now.AddYears(-99) }).ReadToDate; } The linq query that works calls a from after a from, the equivalent of SelectMany(): from g in oc.Users.Where(u => u.aspnet_User.UserName == fbaUsername).First().Groups from d in g.Discussions select new { UnReadPostCount = d.Posts.Where(p => p.CreatedDate > DiscussionRepository.GetLastReadToDate(fbaUsername, p.Discussion)).Count() }; The query that does not work is more like a regular select: from d in oc.Discussions where d.Group.Name == "Student" select new { UnReadPostCount = d.Posts.Where(p => p.CreatedDate > DiscussionRepository.GetLastReadToDate(fbaUsername, p.Discussion)).Count(), }; The error I get is: LINQ to Entities does not recognize the method 'System.DateTime GetLastReadToDate(System.String, Discussion)' method, and this method cannot be translated into a store expression. My question is, why am I able to use my custom GetLastReadToDate() method in the first query and not the second? I suppose this has something to do with what gets executed on the db server and what gets executed on the client? These queries seem to use the GetLastReadToDate() method so similarly though, I'm wondering why would work for the first and not the second, and most importantly if there's a way to factor common query syntax like what's in the GetLastReadToDate() method into a separate location to be reused in several different places LINQ queries. Please note all these queries are sharing the same object context.

    Read the article

  • Entity Relationship Diagram - Relationship Strength?

    - by 01010011
    Hi, I am trying to figure out under what circumstances I should use weak (non-identifying) relationships (where the primary key of the related entity does not contain a primary key component of the parent entity), verses when I should use strong (identifying) relationships (primary key of the related entity contains a primary key component of the parent entity). For example, when designing an Entity Relationship Diagram , if I have two entities, (e.g. book and purchaser), how do I know when to choose the solid Crows Foot or the dashed Crows Foot to connect the two entities? Any assistance will be appreciated. Thanks in advance.

    Read the article

  • Entity Framework mant to many insert

    - by Jacob
    I've been playing around with Entity Framework v2 and added some code to insert new entity with many to many relationship , lets say this entity is called meeting. I add hours to meeting : meeting.Hours.Add(hour); and I get different errors on different occasions On Update : Cannot insert the value NULL into column 'Meetings_Id', table 'Plan.dbo.MeetingHour'; column does not allow nulls. INSERT fails. The statement has been terminated. On Inset : An item with the same key has already been added. But the tricky party is that if I add this manually trough SQL Server Management Studio , I can update the entity with the same value , clearing it first (meeting.Hour.Clear()) Can't see what could be the problem , maybe entity model isn't mapped correctly ?

    Read the article

  • flex/actionscript client entity state refresh on JPA update using Pimento EntityManager

    - by Chris
    My Flex application uses a client-side pimento EntityManager which fetches quite a few objects and associations. It does this by forcing eager fetching of particular association ends in the form of fetch plans. I would like to update the client whenever a change has been made to an entity existing in the EntityManager's cache. Is it possible to update the state of the changed entity ONLY, including updating which entities are associated, without resetting the state of these associated entities? I have setup an EntityListener with a JPA post-update method that notifies clients when a persisted entity has been updated. I want this to trigger a refresh for the modified client-side entity, but calling EntityManager.refresh(entity) resets all lazy associations to proxies. Initializing these proxies resets the associated entities, even if they were loaded previously. I'm looking for an efficient way to keep the client's state in synch with the server's state, at least with respect to the entities that have already been retrieved by the initial load.

    Read the article

  • How to put tags inside an html attribute?

    - by Mycol
    Using xslt i want to create an attribute: <span class="tooltip"> <xsl:attribute name="onmouseover"> <xsl:text>javascript:function(</xsl:text> <span class="label">Aggiunta</span> <xsl:apply-tempaltes/> <xsl:text>)</xsl:text> </xsl:attribute> The problem is that only the pure text is putted inside the attribute, like <span class="tooltip" onmouseover="javascript:function(Aggiunta ...)"> whithout the span tags or the tags that may come from apply-templates. So how can I put html code into an attribute?

    Read the article

  • EF 4.1 Code First Detaching Entity

    - by Nazaf
    I am trying to add an entity to the DB. Once I have added it, I want to detach it, so I can manipulate the object safely without making any changes to the DB. After calling context.SaveChanges() I do the following to detach the entity: // save context.Stories.Add(story); // attach tags. They already exists in the database foreach(var tag in story.Tags) context.Entry(tag).State = System.Data.EntityState.Unchanged; context.SaveChanges(); context.Entry(story).State = System.Data.EntityState.Detached; However, changing the entity state to DETACHED will remove all related entities associated with the my entity. Is there a way to stop this ? If I don't detach the entity, all my changes are sent to the DB next time I call context.SaveChanges() Thanks!!

    Read the article

  • Slides and links for Entity Framework 4 and Azure from Devweek 2010

    - by Eric Nelson
    Last week (March 2010) I presented on Entity Framework 4 and the Windows Azure Platform at www.devweek.com. As usual, it was a great conference and I caught up with lots of old friends and made some new ones along the way. Entity Framework 4 Entity Framework 4 In Microsoft Visual Studio 2010 View more presentations from Eric Nelson. Windows Azure and SQL Azure Building An Application For Windows Azure And Sql Azure View more presentations from Eric Nelson. Entity Framework 4 Related Links Poll on Entity Framework 4 – one year on 101 EF4 Resources Recent resources on Entity Framework 4 Installing all the bits to demo Entity Framework 4 on the Visual Studio 2010 Release Candidate Azure Related Links UK Azure Online Community – join today. UK Windows Azure Site Start working with Windows Azure TCO and ROI calculator for Windows Azure

    Read the article

  • Complex Entity Framework linked-graphs issue: how to limit change set / break the graph?

    - by Hightechrider
    I have an EDMX containing Sentences, and Words, say and a Sentence contains three Words, say. Appropriate FK relationships exist between the tables. I create some words: Word word1 = new Word(); Word word2 = ... I build a Sentence: Sentence x = new Sentence (word1, word2, word3); I build another Sentence: Sentence y = new Sentence (word1, word4, word5); I try to save x to the database, but EF builds a change set that includes everything, including y, word4 and word5 that aren't ready to save to the database. When SaveChanges() happens it throws an exception: Unable to determine the principal end of the ... relationship. Multiple added entities may have the same primary key. I think it does this because Word has an EntityCollection<Sentence> on it from the FK relationship between the two tables, and thus Sentence y is inextricably linked to Sentence x through word1. So I remove the Navigation Property Sentences from Word and try again. It still tries to put the entire graph into the change set. What suggestions do the Entity Framework experts have for ways to break this connection. Essentially what I want is a one-way mapping from Sentence to Word; I don't want an EntityCollection<Sentence> on Word and I don't want the object graph to get intertwined like this. Code sample: This puts two sentences into the database because Verb1 links them and EF explores the entire graph of existing objects and added objects when you do Add/SaveChanges. Word subject1 = new Word(){ Text = "Subject1"}; Word subject2 = new Word(){ Text = "Subject2"}; Word verb1 = new Word(){ Text = "Verb11"}; Word object1 = new Word(){ Text = "Object1"}; Word object2 = new Word(){ Text = "Object2"}; Sentence s1 = new Sentence(){Subject = subject1, Verb=verb1, Object=object1}; Sentence s2 = new Sentence(){Subject=subject2, Verb=verb1, Object=object2}; context.AddToSentences(s1); context.SaveChanges(); foreach (var s in context.Sentences) { Console.WriteLine(s.Subject + " " + s.Verb + " " + s.Object); }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >