Search Results

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

Page 57/397 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • Cast MyEntity To LinqEntity throw a base controller class

    - by Mohammad Kani
    hi there i design a multilayer we appliction andusing LINQ a my data provider i need to user my own Entites instead o LINQ etities. so i created Entities Project and create my entities in it. when i get data from contex and cast them to my entities , everything is ok. but when i want to cast on of my entities to linq entity , an exception thrown. in my linq entity i add CTYPE operator from and to my entities Exp : Public Class BaseController(Of LinqEntity As {BaseEntity, New}, MyEntity As ModuleEntities.BaseEntityInfo) Implements Interfaces.Base(Of ServiceEntity) 'This methd work fine and cast LinqEntity to MyEntity Public Function GetAll() As List(Of MyEntity ) Dim q = (From x In Context.GetTable(Of LinqEntity)() _ Select x).Cast(Of MyEntityBase) End Function Public Sub Update(ByVal entity As MyEntity) 'here is problem 'cast , direct cast , or anything not work Dim x as LinqEntity = entity Me.Context.GetTable(Of LinqEntity).InsertOnSubmit(entity) Me.Context.SubmiChanges() End Sub

    Read the article

  • passing paramters to component in flex

    - by dubbeat
    Hi, I've got 2 files, my Application and a custom component. In my component I have a httpservice and a string named _requestUrl that is bindable. The httpservice uses this. <mx:HTTPService id="srv" url="{_requestUrl}" result="parseHttpResult(event)" resultFormat="xml" method="GET" useProxy="false"> </mx:HTTPService> In my application file I make an instance of my component in the onCreationComplete function. In this function if I say mycomponent._urlRequest ="http://mysite.com" the httpservice throws a null url error but if I say mycomponent.srv.url="http://mysite.com" it works fine. Why is this?

    Read the article

  • SSIS Script Component, Allow Null values

    - by user2471943
    I have a SSIS package that I am programming and my script component won't allow null column inputs. I have checked the box to keep nulls in the flat file source component. My program is running well until my script component where I get the error "The column has a null value" (super vague, I know). The column currently throwing the error is an "int" valued column and is used for aggregations in my script. I could make the null values 0s or to say "NULL" but I'd prefer to just leave them blank. Any advice on how to handle this problem would be greatly appreciated! Thanks in advance! I am using SQL Server BIDS 2008.

    Read the article

  • Transparent control over WM Player ActiveX component in .NET

    - by FatDaemon
    I have a Windows media player activex component in my Form. On top of this WM player i have a picturebox with background color set to transparent. When i set an image for this picturebox , thought the image contains transparent areas it is displayed as black when the picturebox is above the WM player component. Where as if i place the PictureBox somewhere else in the form. The transparent area are rendered properly. So is there anyway that i can place a transparent image on top of a WM Player component. (hmm something like watermark may be). I want this picture to be displayed with may be 50% opacity when the video is playing in WM player control. Will GDI+ be of any use in this case?

    Read the article

  • Inability to detect the Output from inside a SSIS script component

    - by Danaja
    In the script of the script components the Output buffer is not being detected as an existing component. I am trying to use the following piece of code Output0Buffer.AddRow(); within the public override void Input0_ProcessInputRow(Input0Buffer Row) method. I know it should be available within this method because at the moment I am copying and using a component from a previous project that has this code and it works. but when I create a new component and put the same code in it doesn't Can any one explain why this is happening?

    Read the article

  • Updating GUI Component from a different class C# WPF

    - by Boardy
    Hi all, I am trying to update a GUI component (DataGrid) in one class from a different class. I am using C# and WPF Forms. When I used the standard WF forms I could pass a reference to the GUI component as a parameter to the function that needed to do the work with the DataGrid. However, I do not know how I can do this in WPF. I have Class1 which has the GUI component and I need Class3 to run the function inside Class2 which will automatically update the GUI display of the Datagrid found in Class1. Any help with this would be much appreciated.

    Read the article

  • Get params value from component Joomla 3.0

    - by yogeshK
    I have saved value like this in my component table fields params. unique=1 default_value=Default validate=Validate validate_error_msg=Validate error messag searchable=1 Now i want to get value in my component.So I am passing values in my component's view.html.php in this way $params = new JForm($row->params); but its not working. Now I want to get value so I am taking like this $this->params->getValue('default_value'); But its not work where as in Joomla 2.5 ,we can get value like this $this->params->get('default_value');

    Read the article

  • flex accessing children of a list component

    - by pfunc
    when I try to loop through the children of a List component that has buttons in it, I can't seem to access those children. I try for(var btnNum:Number = 0; btnNum < myList.numChildren; btnNum++) { trace(myList.getChildAt(btnNum); } but it is giving some other instance, not the button instances. and the weeklist <mx:List id="myList" dataProvider="{_data.mappoints.week.@number}" > <mx:itemRenderer > <mx:Component> <mx:Button buttonMode="true" toggle="true" alpha="1" width="116" height="35" label="WEEK {data}" > </mx:Button> </mx:Component> </mx:itemRenderer> </mx:List>

    Read the article

  • How to create nested ViewComponents in Monorail and NVelocity?

    - by rob_g
    I have been asked to update the menu on a website we maintain. The website uses Castle Windors Monorail and NVelocity as the template. The menu is currently rendered using custom made subclasses of ViewComponent, which render li elements. At the moment there is only one (horizontal) level, so the current mechanism is fine. I have been asked to add drop down menus to some of the existing menus. As this is the first time I have seen Monorail and NVelocity, I'm a little lost. What currently exists: <ul> #component(MenuComponent with "title=Home" "hover=autoselect" "link=/") #component(MenuComponent with "title=Videos" "hover=autoselect") #component(MenuComponent with "title=VPS" "hover=autoselect" "link=/vps") #component(MenuComponent with "title=Add-Ons" "hover=autoselect" "link=/addons") #component(MenuComponent with "title=Hosting" "hover=autoselect" "link=/hosting") #component(MenuComponent with "title=Support" "hover=autoselect" "link=/support") #component(MenuComponent with "title=News" "hover=autoselect" "link=/news") #component(MenuComponent with "title=Contact Us" "hover=autoselect" "link=/contact-us") </ul> Is it possible to have nested MenuComponents (or a new SubMenuComponent) something like: <ul> #component(MenuComponent with "title=Home" "hover=autoselect" "link=/") #component(MenuComponent with "title=Videos" "hover=autoselect") #blockcomponent(MenuComponent with "title=VPS" "hover=autoselect" "link=/vps") #component(SubMenuComponent with "title="Plans" "hover=autoselect" "link=/vps/plans") #component(SubMenuComponent with "title="Operating Systems" "hover=autoselect" "link=/vps/os") #component(SubMenuComponent with "title="Supported Applications" "hover=autoselect" "link=/vps/apps") #end #component(MenuComponent with "title=Add-Ons" "hover=autoselect" "link=/addons") #component(MenuComponent with "title=Hosting" "hover=autoselect" "link=/hosting") #component(MenuComponent with "title=Support" "hover=autoselect" "link=/support") #component(MenuComponent with "title=News" "hover=autoselect" "link=/news") #component(MenuComponent with "title=Contact Us" "hover=autoselect" "link=/contact-us") </ul> I need to draw the sub menu (ul and li elements) inside the overridden Render method on MenuComponent, so using nested ViewComponent derivatives may not work. I would like a method keep the basically declarative method for creating menus, if at all possible.

    Read the article

  • IComponentActivator Instance

    - by jeffn825
    How can I use an IComponentActivator instance for a component, not just specifying a type. That is, instead of Component.For<XYZ>.Activator<MyComponentActivator>(); I want to be able say Component.For<XYZ>.Activator(new MyComponentActivator(someImportantRuntimeInfo)); Also, is there a way I can choose an activator dynamically for a non specifically registered component? That is, I want to have an activator that looks at the type being resolved, decides if it can activate it, and if not, responsibility for activation should be passed on to the default activator. So basically I want a global IComponentActivator that has the following logic: Create(Type type){ if (ShouldActivate(type)){ DoActivate(type); } else{ // do default activation here somehow } } Thanks!

    Read the article

  • Reloading of persisted entity

    - by Udi
    I'm using OpenJPA in my application as a JPA vendor. The question is theoretical or conceptual: Is there any way to tell an entity manager to load an entity from the DB rather than from it's cache? The problematic scenario: EM1.persist(Entity1) EM2.merge(Entity1) EM1.find(Entity1) <--- Entity1 is the cached version rather than the merged one.. Any elegant way to do it? I really don't want to call em.refresh(entity).

    Read the article

  • Install a file which should be removed only on real uninstall and never overwritten

    - by Viv Coco
    When I install my application, along with the binaries, a conf file is installed that the user can change as he needs (it's actually the user data file). I would like this file to not be overwritten or deleted when a repair, upgrade, modify happens and it should be deleted only when a real uninstall happens. In other words: this conf file is installed along with the binaries and should never be touched again (overwritten/deleted) until a real uninstall happens (not repairs, modifies, upgrades) in which case it should be deleted. So I was thinking of doing: <Component Id="aaa.cfg" Guid="GUID"> <File Id="aaa.cfg" Source="aaa.cfg" KeyPath="yes" /> </Component> But I don't know how could I condition the component so that: 1) the component to be removed only on a real uninstall - not upgrades, repairs, modifies? 2) the file should in no case be overwritten if already exists. Thx, Viv

    Read the article

  • How to add data manually in core data entity

    - by pankaj
    Hi I am working on core data for the first time. I have just created an entity and attributes for that entity. I want to add some data inside the entity(u can say i want to add data in a table), earlier i when i was using sqlite, i would add data using terminal. But here in core data i am not able to find a place where i can manually add data. I just want to add data in entity and display it in a UITableView. I have gone through the the documentation of core data but it does not explain how to add data manually although it explains how i can add it programmiticaly but i dont need to do it programically. I want to do it manually. Thanks in advance

    Read the article

  • iPhoneOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • How to disable sql creation for JPA entity classes

    - by Samuel
    We have some JPA entity classes which are currently under development and wouldn't want them as part of the testing cycle. We tried commenting out the relevant entity classes in META-INF\persistence.xml but the hbm2ddl reverse engineering tool still seems to generate SQL for those entities. How do I tell my code to ignore these classes? Are there any annotations for these or should I have to comment out the @Entity annotation along with my changes in persistence.xml file.

    Read the article

  • iOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • Querying my JPA provider (Hibernate) for a collection of <Id,Name> of an entity

    - by Ittai
    Hi, I have an entity which looks something like this: Id (PK) Name Other business properties and associations... I have the need for my DAL (JPA with hibernate as provider) to return a list of the entities which correlate to some constraints (or just return them all) but instead of returning the entities themselves I'd like to receive only the Id and the Name properties. I know this can be achieved with HQL/SQL (something like: select id,name from entity where...) but I don't want to go down that road. I was thinking of somehow defining the pair a compositioned part of the entity and thought that might help me but I'm not sure that's "legal" as the Id is the PK. The logic for this scenario is to have a textbox which asynchronously queries the web-service (and through it the DAL) for the relevant entities and once an entity is selected then it is loaded as a whole and shipped to the front-end. Would appreciate any feedback, Ittai

    Read the article

  • Netbeans, JPA Entity Beans in seperate projects. Unknown entity bean class

    - by Stu
    I am working in Netbeans and have my entity beans and web services in separate projects. I include the entity beans in the web services project however the ApplicaitonConfig.java file keeps getting over written and removing the entries I make for the entity beans in the associated jar file. My question is: is it required to have both the EntityBeans and the WebServices share the same project/jar file? If not what is the appropriate way to include the entity beans which are in the jar file? <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="jdbc/emrPool" transaction-type="JTA"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>jdbc/emrPool</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="eclipselink.ddl-generation" value="none"/> <property name="eclipselink.cache.shared.default" value="false"/> </properties> </persistence-unit> </persistence> Based on Melc's input i verified that that the transaction type is set to JTA and the jta-data-source is set to the value for the Glassfish JDBC Resource. Unfortunately the problem still persists. I have opened the WAR file and validated that the EntityBean.jar file is the latest version and is located in the WEB-INF/lib directory of the War file. I think it is tied to the fact that the entities are not being "registered" with the entity manager. However i do not know why they are not being registered.

    Read the article

  • Java Container constraints question

    - by llm
    I am using the following: java.awt.Container.add(Component comp, Object constraints) How do I specificy the constraints object? I need to be able to place a component within the container. Oh and my class extends JInternalFrame if this helps... I need to specify coordinates to place the component within the container

    Read the article

  • InputVerifier don't display each component icon(lable)

    - by Sajjad
    I have a form that set a input verifier to it. I want when a user type a correct value for a text field and want to go to other text field, a check icon should be display besides of text field. But now in my code, when user type a correct value on first text field an go to other, Two icons displayed together! public class UserDialog extends JDialog { JButton cancelBtn, okBtn; JTextField fNameTf, lNameTf; JRadioButton maleRb, femaleRb; ButtonGroup group; JLabel fNameLbl, fNamePicLbl, lNameLbl, lNamePicLbl, genderLbl, tempBtn, temp3; public UserDialog() { add(createForm(), BorderLayout.CENTER); setDefaultCloseOperation(DISPOSE_ON_CLOSE); setLocation(400, 100); pack(); setVisible(true); } public JPanel createForm() { JPanel panel = new JPanel(); ImageIcon image = new ImageIcon("Check.png"); okBtn = new JButton("Ok"); cancelBtn = new JButton("Cancel"); tempBtn = new JLabel(); fNameLbl = new JLabel("First Name"); fNamePicLbl = new JLabel(image); fNamePicLbl.setVisible(false); lNameLbl = new JLabel("Last Name"); lNamePicLbl = new JLabel(image); lNamePicLbl.setVisible(false); genderLbl = new JLabel("Gender"); maleRb = new JRadioButton("Male"); femaleRb = new JRadioButton("Female"); temp3 = new JLabel(); group = new ButtonGroup(); group.add(maleRb); group.add(femaleRb); fNameTf = new JTextField(10); fNameTf.setName("FnTF"); fNameTf.setInputVerifier(new MyVerifier(new JComponent[]{maleRb, femaleRb, okBtn})); lNameTf = new JTextField(10); lNameTf.setName("LnTF"); lNameTf.setInputVerifier(new MyVerifier(new JComponent[]{maleRb, femaleRb, okBtn})); panel.add(fNameLbl); panel.add(fNameTf); panel.add(fNamePicLbl); panel.add(lNameLbl); panel.add(lNameTf); panel.add(lNamePicLbl); panel.add(genderLbl); JPanel radioPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); radioPanel.add(maleRb); radioPanel.add(femaleRb); panel.add(radioPanel); panel.add(temp3); panel.add(okBtn); panel.add(cancelBtn); panel.add(tempBtn); panel.setLayout(new SpringLayout()); SpringUtilities.makeCompactGrid(panel, 4, 3, 50, 10, 80, 60); return panel; } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new UserDialog(); } }); } public class MyVerifier extends InputVerifier { private JComponent[] component; public MyVerifier(JComponent[] components) { component = components; } @Override public boolean verify(JComponent input) { String name = input.getName(); if (name.equals("FnTF")) { String text = ((JTextField) input).getText().trim(); if (text.matches(".*\\d.*") || text.length() == 0) { //disable dependent components for (JComponent r : component) { r.setEnabled(false); } return false; } } else if (name.equals("LnTF")) { String text = ((JTextField) input).getText(); if (text.matches(".*\\d.*") || text.length() == 0) { //disable dependent components for (JComponent r : component) { r.setEnabled(false); } return false; } } //enable dependent components for (JComponent r : component) { r.setEnabled(true); } fNamePicLbl.setVisible(true); lNamePicLbl.setVisible(true); return true; } } } }

    Read the article

  • How do i get an instance of the entity type based on MetaTable

    - by dimak
    is there a way to go from a MetaTable to an instance of an entity type so it can be queried with LINQ? What I want to do is this: MetaTable table = GridDataSource.GetTable (); var entity = table.GetInstanceOfEntity(); var test = (from t in entity select t).ToList(); where table.GetInstanceOfEntity() is something that I'm not sure how to implement. Thank you

    Read the article

  • How to configure a Custom Datacontract Serializer or XMLSerializer

    - by user364445
    Im haveing some xml that have this structure <Person Id="*****" Name="*****"> <AccessControlEntries> <AccessControlEntry Id="*****" Name="****"/> </AccessControlEntries> <AccessControls /> <IdentityGroups> <IdentityGroup Id="****" Name="*****" /> </IdentityGroups></Person> and i also have this entities [DataContract(IsReference = true)] public abstract class EntityBase { protected bool serializing; [DataMember(Order = 1)] [XmlAttribute()] public string Id { get; set; } [DataMember(Order = 2)] [XmlAttribute()] public string Name { get; set; } [OnDeserializing()] public void OnDeserializing(StreamingContext context) { this.Initialize(); } [OnSerializing()] public void OnSerializing(StreamingContext context) { this.serializing = true; } [OnSerialized()] public void OnSerialized(StreamingContext context) { this.serializing = false; } public abstract void Initialize(); public string ToXml() { var settings = new System.Xml.XmlWriterSettings(); settings.Indent = true; settings.OmitXmlDeclaration = true; var sb = new System.Text.StringBuilder(); using (var writer = System.Xml.XmlWriter.Create(sb, settings)) { var serializer = new XmlSerializer(this.GetType()); serializer.Serialize(writer, this); } return sb.ToString(); } } [DataContract()] public abstract class Identity : EntityBase { private EntitySet<AccessControlEntry> accessControlEntries; private EntitySet<IdentityGroup> identityGroups; public Identity() { Initialize(); } [DataMember(Order = 3, EmitDefaultValue = false)] [Association(Name = "AccessControlEntries")] public EntitySet<AccessControlEntry> AccessControlEntries { get { if ((this.serializing && (this.accessControlEntries==null || this.accessControlEntries.HasLoadedOrAssignedValues == false))) { return null; } return accessControlEntries; } set { accessControlEntries.Assign(value); } } [DataMember(Order = 4, EmitDefaultValue = false)] [Association(Name = "IdentityGroups")] public EntitySet<IdentityGroup> IdentityGroups { get { if ((this.serializing && (this.identityGroups == null || this.identityGroups.HasLoadedOrAssignedValues == false))) { return null; } return identityGroups; } set { identityGroups.Assign(value); } } private void attach_accessControlEntry(AccessControlEntry entity) { entity.Identities.Add(this); } private void dettach_accessControlEntry(AccessControlEntry entity) { entity.Identities.Remove(this); } private void attach_IdentityGroup(IdentityGroup entity) { entity.MemberIdentites.Add(this); } private void dettach_IdentityGroup(IdentityGroup entity) { entity.MemberIdentites.Add(this); } public override void Initialize() { this.accessControlEntries = new EntitySet<AccessControlEntry>( new Action<AccessControlEntry>(this.attach_accessControlEntry), new Action<AccessControlEntry>(this.dettach_accessControlEntry)); this.identityGroups = new EntitySet<IdentityGroup>( new Action<IdentityGroup>(this.attach_IdentityGroup), new Action<IdentityGroup>(this.dettach_IdentityGroup)); } } [XmlType(TypeName = "AccessControlEntry")] public class AccessControlEntry : EntityBase, INotifyPropertyChanged { private EntitySet<Service> services; private EntitySet<Identity> identities; private EntitySet<Permission> permissions; public AccessControlEntry() { services = new EntitySet<Service>(new Action<Service>(attach_Service), new Action<Service>(dettach_Service)); identities = new EntitySet<Identity>(new Action<Identity>(attach_Identity), new Action<Identity>(dettach_Identity)); permissions = new EntitySet<Permission>(new Action<Permission>(attach_Permission), new Action<Permission>(dettach_Permission)); } [DataMember(Order = 3, EmitDefaultValue = false)] public EntitySet<Permission> Permissions { get { if ((this.serializing && (this.permissions.HasLoadedOrAssignedValues == false))) { return null; } return permissions; } set { permissions.Assign(value); } } [DataMember(Order = 4, EmitDefaultValue = false)] public EntitySet<Identity> Identities { get { if ((this.serializing && (this.identities.HasLoadedOrAssignedValues == false))) { return null; } return identities; } set { identities.Assign(identities); } } [DataMember(Order = 5, EmitDefaultValue = false)] public EntitySet<Service> Services { get { if ((this.serializing && (this.services.HasLoadedOrAssignedValues == false))) { return null; } return services; } set { services.Assign(value); } } private void attach_Permission(Permission entity) { entity.AccessControlEntires.Add(this); } private void dettach_Permission(Permission entity) { entity.AccessControlEntires.Remove(this); } private void attach_Identity(Identity entity) { entity.AccessControlEntries.Add(this); } private void dettach_Identity(Identity entity) { entity.AccessControlEntries.Remove(this); } private void attach_Service(Service entity) { entity.AccessControlEntries.Add(this); } private void dettach_Service(Service entity) { entity.AccessControlEntries.Remove(this); } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string name) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(name)); } #endregion public override void Initialize() { throw new NotImplementedException(); } } [DataContract()] [XmlType(TypeName = "Person")] public class Person : Identity { private EntityRef<Login> login; [DataMember(Order = 3)] [XmlAttribute()] public string Nombre { get; set; } [DataMember(Order = 4)] [XmlAttribute()] public string Apellidos { get; set; } [DataMember(Order = 5)] public Login Login { get { return login.Entity; } set { var previousValue = this.login.Entity; if (((previousValue != value) || (this.login.HasLoadedOrAssignedValue == false))) { if ((previousValue != null)) { this.login.Entity = null; previousValue.Person = null; } this.login.Entity = value; if ((value != null)) value.Person = this; } } } public override void Initialize() { base.Initialize(); } } [DataContract()] [XmlType(TypeName = "Login")] public class Login : EntityBase { private EntityRef<Person> person; [DataMember(Order = 3)] public string UserID { get; set; } [DataMember(Order = 4)] public string Contrasena { get; set; } [DataMember(Order = 5)] public Domain Dominio { get; set; } public Person Person { get { return person.Entity; } set { var previousValue = this.person.Entity; if (((previousValue != value) || (this.person.HasLoadedOrAssignedValue == false))) { if ((previousValue != null)) { this.person.Entity = null; previousValue.Login = null; } this.person.Entity = value; if ((value != null)) value.Login = this; } } } public override void Initialize() { throw new NotImplementedException(); } } [DataContract()] [XmlType(TypeName = "IdentityGroup")] public class IdentityGroup : Identity { private EntitySet<Identity> memberIdentities; public IdentityGroup() { Initialize(); } public override void Initialize() { this.memberIdentities = new EntitySet<Identity>(new Action<Identity>(this.attach_Identity), new Action<Identity>(this.dettach_Identity)); } [DataMember(Order = 3, EmitDefaultValue = false)] [Association(Name = "MemberIdentities")] public EntitySet<Identity> MemberIdentites { get { if ((this.serializing && (this.memberIdentities.HasLoadedOrAssignedValues == false))) { return null; } return memberIdentities; } set { memberIdentities.Assign(value); } } private void attach_Identity(Identity entity) { entity.IdentityGroups.Add(this); } private void dettach_Identity(Identity entity) { entity.IdentityGroups.Remove(this); } } [DataContract()] [XmlType(TypeName = "Group")] public class Group : Identity { public override void Initialize() { throw new NotImplementedException(); } } but the ToXml() response something like this <Person xmlns:xsi="************" xmlns:xsd="******" ID="******" Name="*****"/><AccessControlEntries/></Person> but what i want is something like this <Person Id="****" Name="***" Nombre="****"> <AccessControlEntries/> <IdentityGroups/> </Person>

    Read the article

  • Is it possible to make a non-nullable column nullable when used in a view? (sql server)

    - by Matt
    Hi, To start off I have two tables, PersonNames and PersonNameVariations. When a name is searched, it finds the closest name to one of the ones available in PersonNames and records it in the PersonNameVariations table if it's not already in there. I am using a stored proc to search the PersonNames for a passed in PersonNameVariationand return the information on both the PersonName found and the PersonNameVariation that was compared to it. Since I am using the Entity Framework, I needed return a complex type in the Import Function but for some reason it says my current framework doesn't support it. My last option was to use an Entity to return in my stored proc instead. The result that I needed back is the information on both the PersonName that was found and the PersonNameVariation that was recorded. Since I cannot return both entities, I created a view PersonSearchVariationInfo and added it into my Entity Framework in order to use it as the entity to return. The problem is that the search will not always return a Person Name match. It needs to be able to return only the PersonNameVariation data in some cases, meaning that all the fields in the PersonSearchVariationInfo pertaining to PersonName need to be nullable. How can I take my view and make some of the fields nullable? When I do it directly in the Entity Framework I get a mapping error: Error 4 Error 3031: Problem in mapping fragments starting at line 1202:Non-nullable column myproject_vw_PersonSearchVariationInfo.DateAdded in table myproject_vw_PersonSearchVariationInfo is mapped to a nullable entity property. C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MyProject\MyProject.Domain\EntityFramework\MyProjectDBEntities.edmx 1203 15 MyProject.Domain Anyone have any ideas? Thanks, Matt

    Read the article

  • EF4 POCO Not Updating Navigation Property On Save

    - by Gavin Draper
    I'm using EF4 with POCO objects the 2 tables are as follows Service ServiceID, Name, StatusID Status StatusID, Name The POCO objects look like this Service ServiceID, Status, Name Status StatusID, Name With Status on the Service object being a Navigation Property and of type Status. In my Service Repository I have a save method that takes a service objects attaches it to the context and calls save. This works fine for the service, but if the status for that service has been changed it does not get updated. My Save method looks like this public static void SaveService(Service service) { using (var ctx = Context.CreateContext()) { ctx.AttachModify("Services", service); ctx.AttachTo("Statuses",service.Status); ctx.SaveChanges(); } } The AttachModify method attaches an object to the context and sets it to modified it looks like this public void AttachModify(string entitySetName, object entity) { if (entity != null) { AttachTo(entitySetName, entity); SetModified(entity); } } public void SetModified(object entity) { ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); } If I look at a SQL profile its not even including the navigation property in the update for the service table, it never touches the StatusID. Its driving me crazy. Any idea what I need to do to force the Navigation Property to update?

    Read the article

  • HDMI vs Component vs VGA vs DVI vs DisplayPort

    - by Nazadus
    What is the real benefits of all of these? From what I can understand, HDMI offers the ability to send audio along the same cable as well as the ability to do progressive scan. I've Googled but I can't seem to find any real answers. Why would someone care to run 1280x1024 over HDMI or DVI instead of VGA? What about component? All I hear is one is digital and one is analog, but I can't find what that means from a feature/benefit stand point.

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >