Search Results

Search found 9916 results on 397 pages for 'entity component'.

Page 87/397 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • How to save in Hindi in database using MVC application

    - by user219315
    I have a MVC application and using the entity framework model for MYSQL database. I what to save hindi text in database. When I using the hindi text then it is showing ?? in database. I am using ckeditor to enter the text How can I save the hindi text.I have also changed the collation to utf-8. Thanks supriya

    Read the article

  • SQL table relationship not showing up in visual studio

    - by PFranchise
    Hey, I made several tables and relationships using SQL server manager. I then imported them to visual studio and it all appeared in the correct form, except one of the relationships did not appear. I have checked everything I could think of and it is the exact same as the other relationships. If you know anything I can check, I would appreciate it. Thanks I am using the entity framework, visual studio 2010.

    Read the article

  • null from C# getting converted into 'NULL' in Sql Server

    - by Anand
    I am trying to insert NULL value in Sql Server if I have null value in corresponding C# String object like below : String Residence = xmlDoc.Descendants("Appointment").Single().Element("StateOfResidence") == null ? null : xmlDoc.Descendants("Appointment").Elements("StateOfResidence").Single().Value; I am using Entity framework for Database access. So if Residence is null, 'NULL' gets inserted into Database instead of NULL. How can insert NULL for null ?

    Read the article

  • Which is more flexible in regards to database changes, EF 4 or Linq to SQL

    - by JBeckton
    Reading about both Linq to SQL and Entity Framework I have developed the impression that EF is more suitable for apps that get data from multiple data sources. But as I am reading about MVC2 models I see an example where EF is more loosely coupled with your data model. If I have to add or remove some columns from a table then what is involved in updating my model or DAL with each of these implementations?

    Read the article

  • Upgrading From EF 4x to 6 breaks everything

    - by dan h
    Attempted to upgrade my project from EF4 to EF6, I get build errors It appears that if i swap out the namespaces manually to include the entity.core it works, but if i change the .edmx file at all, the code reverts back to the old references and i have to manually edit the code generation files to include the update namespace references. I have attempted to "add code generation item" that does not resolve the issue at all. When i open the .edmx file in the IDE it shows me everything correctly.

    Read the article

  • XML allows for external entities; what about XHTML?

    - by xtofl
    This question about web page 'inclusion' triggered my curiosity. The XML allows you to specify a reference to an 'external' portion. Can you do the same in XHTML, then? XML example: <!ENTITY foo SYSTEM "http://www.mydomain.com/logo.gif" NDATA GIF87A> ... <SOMETHING>&foo;</SOMETHING>

    Read the article

  • How do I verify my EF4 Code-Only mappings?

    - by Tomas Lycken
    In NHibernate, there is a method doing something like ThisOrThat.VeryfyMappings() (I don't know the exact definition of it since it was a while ago I last tried NHibernate...) I recall seeing a blog post somewhere where the author showed how to do some similar testing in Entity Framework 4, but now I cant find it. So, how do I test my EF4 Code-Only mappings?

    Read the article

  • 'Subquery returned more than 1 value' problem in EntityFramework

    - by plotnick
    I have one 'Transaction' entity object with 'Operations' navproperty with multiplicity of 'Many'. When I'm adding only one operation per transaction nothing happens, but when I'm trying to add more than one operation, db.SaveChanges() throws an exception like 'Subquery returned more than 1 value blah, blah, blah' How can I solve that? Help me guys please... BTW... Could you tell me how can I see the exact query string that EF passes to Sql Server on db.SaveChanges() method?

    Read the article

  • How can I define custom 'contentGroups' in a custom Flex 4 component?

    - by swidnikk
    The spark panel component for example can be written like this And its skin file will handle layout of the contentGroup, controlBarGroup, and titleDisplay. Notice, however that the contentGroup is doesn't appear in the code above and that the controlBarGroup accepts child mxml components. Now say I want to create a custom component that defines various required and non-required skinparts, such as 'headerGroup', 'navigationGroup', and 'accountPreferencesGroup'. I'd like to write this custom component like this The motivation here is that I can now create a couple different skin files to change the look and layout of those subgroups. Reading source of the spark panel, there are some calls within the mx_internal namespace such as getMXMLContent() which is a method of the spark group component, but which I have no access to. Does the description above make sense? How can I create custom 'contentGroups' in my custom Flex4 component that can use nested mxml child components? Should I approach this a different way?

    Read the article

  • External XMPP component - Anyone know a Tutorial or Open Source Example please?

    - by gav
    Hi All, I want to run an XMPP server (Openfire) and register an external component to handle the messages it will recieve (using the Whack library). The external component will run my game logic and I will be using XMPP to send player moves to the server and status updates in the other direction. The bonus with XMPP is that we get built in chat for free. The trouble is, although Ignite look fairly established, I can't find a tutorial on how to write, register and debug an External XMPP component written with Whack, there are very few in general for that matter. I am not invested in either the server implementation or the External Component library, java is just my language of choice. If I was to move to Erlang or Scala or something it would have to be a very simple in that language. A single tutorial or example would go a long way here, I just need an basic External XMPP component pretty please! Kind regards, Gavin

    Read the article

  • How do I tell NHibernate to load a component as not null even when all its properties are null?

    - by SharePoint Newbie
    Hi, I have a Date class which wraps over the DateTime? class (aids in mocking DateTime.Now, our domain ,etc). The Date class class only has one protected property : DateTime? date public class Date { protected DateTime? date; } // mapping in hbm <component name="CompletedOn"> <property column="StartedOn" name="date" access="field" not-null="false" /> </component> From the nhibernate docs: Like all value types, components do not support shared references. The null value semantics of a component are ad hoc. When reloading the containing object, NHibernate will assume that if all component columns are null, then the entire component is null. This should be okay for most purposes. Can I override this behaviour? I want my Date class to be instantiated even if date is null. Thanks,

    Read the article

  • waiting for 2 different events in a single thread

    - by João Portela
    component A (in C++) - is blocked waiting for alarm signals (not relevant) and IO signals (1 udp socket). has one handler for each of these. component B (java) - has to receive the same information the component A udp socket receives. periodicaly gives instructions that should be sent through component A udp socket. How to join both components? it is strongly desirable that: the changes to attach component B to component A are minimal (its not my code and it is not very pleasent to mess with). the time taken by the new operations (usually communicating with component B) interfere very little with the usual processing time of component A - this means that if the operations are going to take a "some" time I would rather use a thread or something to do them. note: since component A receives udp packets more frequently that it has component B instructions to forward, if necessary, it can only forward the instructions (when available) from the IO handler. my initial ideia was to develop a component C (in C++) that would sit inside the component A code (is this called an adapter?) that when instanciated starts the java process and makes the necessary connections (that not so little overhead in the initialization is not a problem). It would have 2 stacks, one for the data to give component B (lets call it Bstack) and for the data to give component A (lets call it Astack). It would sit on its thread (lets call it new-thread) waiting for data to be available in Bstack to send it over udp, and listen on the udp socket to put data on the Astack. This means that the changes to component A are only: when it receives a new UDP packet put it on the Bstack, and if there is something on the Astack sent it over its UDP socket (I decided for this because this socket would only be used in the main thread). One of the problems is that I don't know how to wait for both of these events at the same time using only one thread. so my questions are: Do I really need to use the main thread to send the data over component A socket or can I do it from the new-thread? (I think the answer is no, but I'm not sure about race conditions on sockets) how to I wait for both events? boost::condition_variable or something similar seems the solution in the case of the stack and boost::asio::io_service io_service.run() seems like the thing to use for the socket. Is there any other alternative solution for this problem that I'm not aware of? Thanks for reading this long text but I really wanted you to understand the problem.

    Read the article

  • How to overcome shortcomings in reporting from EAV database?

    - by David Archer
    The major shortcomings with Entity-Attribute-Value database designs in SQL all seem to be related to being able to query and report on the data efficiently and quickly. Most of the information I read on the subject warn against implementing EAV due to these problems and the commonality of querying/reporting for almost all applications. I am currently designing a system where almost all the fields necessary for data storage are not known at design/compile time and are defined by the end-user of the system. EAV seems like a good fit for this requirement but due to the problems I've read about, I am hesitant in implementing it as there are also some pretty heavy reporting requirements for this system as well. I think I've come up with a way around this but would like to pose the question to the SO community. Given that typical normalized database (OLTP) still isn't always the best option for running reports, a good practice seems to be having a "reporting" database (OLAP) where the data from the normalized database is copied to, indexed extensively, and possibly denormalized for easier querying. Could the same idea be used to work around the shortcomings of an EAV design? The main downside I see are the increased complexity of transferring the data from the EAV database to reporting as you may end up having to alter the tables in the reporting database as new fields are defined in the EAV database. But that is hardly impossible and seems to be an acceptable tradeoff for the increased flexibility given by the EAV design. This downside also exists if I use a non-SQL data store (i.e. CouchDB or similar) for the main data storage since all the standard reporting tools are expecting a SQL backend to query against. Do the issues with EAV systems mostly go away if you have a seperate reporting database for querying? EDIT: Thanks for the comments so far. One of the important things about the system I'm working on it that I'm really only talking about using EAV for one of the entities, not everything in the system. The whole gist of the system is to be able to pull data from multiple disparate sources that are not known ahead of time and crunch the data to come up with some "best known" data about a particular entity. So every "field" I'm dealing with is multi-valued and I'm also required to track history for each. The normalized design for this ends up being 1 table per field which makes querying it kind of painful anyway. Here are the table schemas and sample data I'm looking at (obviously changed from what I'm working on but I think it illustrates the point well): EAV Tables Person ------------------- - Id - Name - ------------------- - 123 - Joe Smith - ------------------- Person_Value ------------------------------------------------------------------- - PersonId - Source - Field - Value - EffectiveDate - ------------------------------------------------------------------- - 123 - CIA - HomeAddress - 123 Cherry Ln - 2010-03-26 - - 123 - DMV - HomeAddress - 561 Stoney Rd - 2010-02-15 - - 123 - FBI - HomeAddress - 676 Lancas Dr - 2010-03-01 - ------------------------------------------------------------------- Reporting Table Person_Denormalized ---------------------------------------------------------------------------------------- - Id - Name - HomeAddress - HomeAddress_Confidence - HomeAddress_EffectiveDate - ---------------------------------------------------------------------------------------- - 123 - Joe Smith - 123 Cherry Ln - 0.713 - 2010-03-26 - ---------------------------------------------------------------------------------------- Normalized Design Person ------------------- - Id - Name - ------------------- - 123 - Joe Smith - ------------------- Person_HomeAddress ------------------------------------------------------ - PersonId - Source - Value - Effective Date - ------------------------------------------------------ - 123 - CIA - 123 Cherry Ln - 2010-03-26 - - 123 - DMV - 561 Stoney Rd - 2010-02-15 - - 123 - FBI - 676 Lancas Dr - 2010-03-01 - ------------------------------------------------------ The "Confidence" field here is generated using logic that cannot be expressed easily (if at all) using SQL so my most common operation besides inserting new values will be pulling ALL data about a person for all fields so I can generate the record for the reporting table. This is actually easier in the EAV model as I can do a single query. In the normalized design, I end up having to do 1 query per field to avoid a massive cartesian product from joining them all together.

    Read the article

  • EF Code first + Delete Child Object from Parent?

    - by ebb
    I have a one-to-many relationship between my table Case and my other table CaseReplies. I'm using EF Code First and now wants to delete a CaseReply from a Case object, however it seems impossible to do such thing because it just tries to remove the CaseId from the specific CaseReply record and not the record itself.. short: Case just removes the relationship between itself and the CaseReply.. it does not delete the CaseReply. My code: // Case.cs (Case Object) public class Case { [Key] public int Id { get; set; } public string Topic { get; set; } public string Message { get; set; } public DateTime Date { get; set; } public Guid UserId { get; set; } public virtual User User { get; set; } public virtual ICollection<CaseReply> Replies { get; set; } } // CaseReply.cs (CaseReply Object) public class CaseReply { [Key] public int Id { get; set; } public string Message { get; set; } public DateTime Date { get; set; } public int CaseId { get; set; } public Guid UserId { get; set; } public virtual User User { get; set; } public virtual Case Case { get; set; } } // RepositoryBase.cs public class RepositoryBase<T> : IRepository<T> where T : class { public IDbContext Context { get; private set; } public IDbSet<T> ObjectSet { get; private set; } public RepositoryBase(IDbContext context) { Contract.Requires(context != null); Context = context; if (context != null) { ObjectSet = Context.CreateDbSet<T>(); if (ObjectSet == null) { throw new InvalidOperationException(); } } } public IRepository<T> Remove(T entity) { ObjectSet.Remove(entity); return this; } public IRepository<T> SaveChanges() { Context.SaveChanges(); return this; } } // CaseRepository.cs public class CaseRepository : RepositoryBase<Case>, ICaseRepository { public CaseRepository(IDbContext context) : base(context) { Contract.Requires(context != null); } public bool RemoveCaseReplyFromCase(int caseId, int caseReplyId) { Case caseToRemoveReplyFrom = ObjectSet.Include(x => x.Replies).FirstOrDefault(x => x.Id == caseId); var delete = caseToRemoveReplyFrom.Replies.FirstOrDefault(x => x.Id == caseReplyId); caseToRemoveReplyFrom.Replies.Remove(delete); return Context.SaveChanges() >= 1; } } Thanks in advance.

    Read the article

  • Does a VCL OrgChart component with decent features exists? Is there a viable alternative?

    - by user193655
    I am using DevExpress OrgChart component that is still maintained but not developed since 2003 (fortunately bugs are fixed, but nothing more). Honestly this component, even if it starts to look too old still suffices my requirements except for 2 things: 1) it doesn't support at all the staff feature, for understanding what I mean see this image (where the items in staff are Administration, Communication, IT, Special Projects). 2) it arranges the items without optimizing the space, for example if there are 3 items at top level, and only the second item has 2 childs, the top items items are drawn more distantly, because of the 2 childs, there is no an option for "shirinking" the diagram. Of course the component misses tons of the features one would expect from an OrgChart tool, but in my case Those 2, and expecially (1) are important, the rest is lack of eye-candy. I look for VCL components, but if (as I fear, since I never found it) such component doesn't exist) I can see the following alternatives: i) using Hydra with .net winforms components ii) using ActiveX components. Between the 2 I would prefer ActiveX because of the .NET deployment hell (what I like about Delphi is that you ship the exe to the customer witn Win2k and it works). Anyway I never used an activeX control and I don't know which are the deployment issues, but I fear I will lose the opportunity of replacing an exe and upgrading the software. iii) hire a delphi component develoeper that can customize the DevEx component by adding feature (1) and maybe (2). I am stuck.

    Read the article

  • The EntitySet name xxx could not be found.

    - by adamjellyit
    I create a simple table in SqlServer .. key field integer, 4 strings and a Timestamp This Table is called Event .. which pluralizes to Events.(the checkbox was ticked) I run the Entity Builder in VS2010 just adding this table only. EntityModelXXX x = new EntityModelXXX(); // create an object 'e' here x.AddToEvents(e); produces an error : The EntitySet name 'EntityModelXXX.Events' could not be found. It doesn't seem to find the set .. why?

    Read the article

  • EF4, self tracking, repository pattern, SQL Server 2008 AND SQL Server Compact

    - by Darren
    Hi, I am creating a project using Entity Frameworks 4 and self tracking entities. I want to be able to either get the data from a sql server 2008 database or from sql server compact database (with the switch being in the config file). I am using the repository pattern and I will have the self tracking entities sitting in a separate assembly. Do I need two edmx files? If so, how do I generate only one set of STE's in the separate assembly? Also do I need to generate two context classes as well? I am unsure of the plumbing for all this. Can anyone help? Darren I forgot to add that the two databases will be identical and that the compact version is for offline usage.

    Read the article

  • Compile error with Nested Classes

    - by ProfK
    I have metadata classes nested within entity classes, as I have always done, but suddenly, when I deploy to my target web site, and try and view a page, I get e.g. the following compile error: CS0102: The type 'PvmmsModel.ActivationResource' already contains a definition for 'ActivationResourceMetadata' My code for this type looks like below. There is only one definition of ActivationResourceMetadata: namespace PvmmsModel { [DisplayName("Activation Resources")] [DisplayColumn("Name")] [MetadataType(typeof(ActivationResourceMetadata))] public partial class ActivationResource { public class ActivationResourceMetadata { [ScaffoldColumn(false)] public object ResourceId { get; set; } [DisplayName("Cell Phone")] public object CellPhone { get; set; } [DisplayName("Shifts Worked or Planned")] public object ActivationShifts { get; set; } } } } This is on an ASP.NET WebSite project.

    Read the article

  • SQL's Rownumber with Linq-to-entities

    - by mariki
    I am converting my project to use EF and also want to covert stored procedures into Linq-to-entities queries. This my SQL query (simple version) that I have trouble to convert: SELECT CategoryID, Title as CategoryTitle,Description, LastProductTitle,LastProductAddedDate FROM ( SELECT C.CategoryID, C.Title,C.Description, C.Section, P.Title as LastProductTitle, P.AddedDate as LastProductAddedDate, ROW_NUMBER() OVER (PARTITION BY P.CategoryID ORDER BY P.AddedDate DESC) AS Num FROM Categories C LEFT JOIN Products P ON P.CategoryID = C.CategoryID ) OuterSelect WHERE OuterSelect.Num = 1 In words: I want to return all Categories (from Categories table) and title and date of addition of the product (from Products table) that was added last to this category. How can I achieve this using Entity frame work query? In most efficient way.

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >