C# :: Entity Framework Generate From Database Give Blank EDMX Diagram

Aug 27, 2014

Yes, exactly, and I have been successfully creating EF Model before from the same database.... Why is it acting up now... I did check SO and they seems not to have a solution for it also....

View 8 Replies


ADVERTISEMENT

C# :: Cascading Deletes In Entity Framework Code First

Apr 15, 2015

I'm a bit unsure on where to put cascading deletes in my models and how far they extend.

I've got four tables

TrafficLog
has a One to One with
TransactionHistory
Has a zero to Many with
OutgoingService
and
Exceptions

Now i'd like to put cascading deletes on, so that if i delete a record from TrafficLog it deletes from the other three.

So do i set up my model with cascade delete just on the primary like this

modelBuilder.Entity<TCC_ArchivedApplicationTrafficLog>()
.HasRequired(TCC_ArchivedTransactionHistory)
.WithRequiredDependent()
.WillCascadeOnDelete(true);

or do i need to enable it on the other three tables too?

View 3 Replies View Related

C# :: Entity Framework - Select Specific Column In Tables

Apr 28, 2015

I need to show in a comboBox thats shows infor from Entity framework but i need to select a specific colum in the tables..

All in C# visual studio xaml form

So I created a var but i get and output: name of programe.NLHEntities

using (var context = new NLHEntities()) {
var blog = context.EtagesChambres
.Where(b => b.TypeChanbre == "Prive")
.FirstOrDefault();
textBox2Type.Text = Convert.ToString(blog);// i put a text box to see what the output would be..
}

View 14 Replies View Related

C Sharp :: Declaring Navigation Property In Entity Framework

Nov 3, 2012

I developed a sample application in EF which has 3 tables

PersonDetails, BankDetails and FixedDepositDetails.

Please find the table structure below

create table PersonDetails
(PersonId int Primary Key,
PersonName varchar(30))  
create table BankDetails
(BankId int Primary Key,
BankName varchar(100),

[Code] ....

But when I run the application I get an error as

The navigation property 'Bank_Id' is not a declared property on type 'FixedDepositDetails'. Verify that it has not been explicitly excluded from the model and that it is a valid navigation property.

If I am not wrong I think I have made some mistakes when creating the model.

View 1 Replies View Related

C++ :: How To Give Database Connection To Code

Apr 11, 2013

how to give a database connection to a c++ code i am using turbo c++ as an editor and if i have oracle 11g client, odbc as a driver , what else i require and how to link these things in a code.

View 1 Replies View Related

C++ :: How To Create UML Diagram

May 11, 2014

I need to create a UML class diagram for this code

private:
GradedActivity *grades[NUM_GRADES];

public:
void setLab(GradedActivity *activity)
{ grades[LAB] = activity; }

View 1 Replies View Related

C :: Circuit Diagram - Programming A Timer

Jan 29, 2014

I have attached a circuit diagram below, which has been tested. Currently you have to manually push the switch to change the brightness of the bulbs. I want to program a chip to automate this.

Over 90 days the chip will output a high signal in replace of the switch every set period of time (say once every 1.5days). I can use any chip but the smaller the better!

View 1 Replies View Related

C/C++ :: Displaying Binary Tree Diagram?

Nov 15, 2014

I am making a Binary Tree program for a Data structures class proyect. The program consist of displaying a Binary tree diagram and also to give the inorder,postorder and preorder of the diagram. I made the program program give me the inorder,postorder and preorder of the binary tree. However I am having problems with the display. I am trying to use breadth first search for the display, and I made the funtion for BFS but I am stuck on how to proceed.My code is the following:

#include<stdlib.h>
#include<stdio.h>
#include<iostream>

[Code].....

View 1 Replies View Related

C# :: Data Binding Using Entity Frameworks

Dec 9, 2014

I've got a datagrid setup and i'm using an entity model as the datasource, i thought i had stuctured my query so that i would only get a single column result but the display within the datagrid shows two columns?

here's the xaml for the form

<Window x:Class="UpdateAccelaAssets.winUsersRemove"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Remove User" Height="300" Width="300">

[Code] .....

And I've attached a screenshot of the result.

Attached image(s)

View 3 Replies View Related

C++ :: Function Call That Moves Entity From One Vector To Another

Nov 15, 2014

Ok so I have a function call that moves an Entity from one vector to another, and if one doesn't exist then it creates one and moves it:

std::vector<std::unique_ptr<Entity>> ActiveEntities;
std::vector<std::unique_ptr<Entity>> EntityPool;

// Creates a generic entity in the entity pool
void EntityManager::CreateEntity() {

[Code] .....

In this case it checks the entity pool for an entity, if one exists it moves it to the active entities and then returns the unique id, if one doesn't exist it creates one then calls itself to run the check again to verify and move the new entity.

My question is, is this a valid form of recursion since it only incurs a single loop of recursion, or should I reform the entire system to work differently? If so, how do you set this up in a way that does not cause recursion?

View 3 Replies View Related

C :: Expandable Menu Framework

Mar 8, 2014

I'm new to C programming and I need to write a "small" expandable menu framework and I don't know where to start off.

This is my task: Create an expandable menu framework in C where you can add a infinite number of entries and Sub menus containing other Menu points or where the entries refer to a external function. So far I've created the structures I need

Code:
//Menu structure
struct menu {
char mtitel[MAX];
struct mpoint point;
struct menu *next, *prev;

[Code] .....

View 2 Replies View Related

C++ :: Game With Entity Component System - Generalizing Repeated Functions

Dec 20, 2014

I'm working on a game with an entity-component system. I have a Manager class that is handling all of the components by feeding them into vectors set up for each type of component. Right now I have a lot of repeated code for each kind of component.

void add_pos_comp(shared_ptr<Position> pos_comp);
shared_ptr<Position> get_pos_comp(int id);
const vector<shared_ptr<Position>>& get_pos_comps();

void add_vel_comp(shared_ptr<Velocity> vel_comp);
shared_ptr<Velocity> get_vel_comp(int id);
const vector<shared_ptr<Velocity>>& get_vel_comps();

I've tried generalizing this with templates, but I've been confused by how I should organize the collection of vectors for each component. I had it setup so that they were all in an unordered_map, but how to get the templated functions to find the right map slot to use based simply on the template's parameters.

The full project is here for reference: [URL] ....

View 2 Replies View Related

C++ :: How To Get TinyXML In SDL Based Framework To Render Map

Jan 10, 2015

To the topic: I've been following "SDL game development" book by Shaun Mitchell and (besides the many others in the past) I've encountered a problem in one of the chapters.

I'm in "creating and displaying tile maps". The chapter uses tintxml to load data outside the code, which is used to create a "map screen".

The problem is that the program work perfect except for not loading and/or rendering this "screen".

I know this is too vague of an explanation, but I wouldn't know what else to say.

I'm leaving the link to the repository with all the code: [URL]...

View 12 Replies View Related

C++ :: Writing Plugin Framework / System For Game

Mar 23, 2014

So I'm trying to accomplish something that right seems to hard for it to be worth it. I'm trying to write a plugin framework/system for my game. I have read about it and everything that pops up says it's OS-specific and you have to load the plugins from either a .so file on linux or from a .dll file on Windows. So here lie my questions:

-Is there any universal way of accomplishing this?

-Every way I've seen assumes i know the names of the functions I'm calling which doesn't hold true if the plugin are written by a 3rd party. How would i turn the table on this matter?

View 1 Replies View Related

C++ :: SDL2 Framework - Loading MBP Files In Same Folder In XCode 5

Feb 23, 2014

I am trying to load a .bmp file located in the same folder as main.cpp etc. but I'm not sure what to input as the resource path so that it picks it up and, when I distribute it, I want it to be preferably cross platform and run smoothly.

I have tried using:

hello_world.bmp
SDL_Game/hello_world.bmp (SDL_Game is the name of the project)

but it will work if I use the full path. I don't want to do this though, because then it will not work on other computers and platforms.

This is the function I use to load media:

bool loadMedia() {
// Loading success flag
bool success = true;

// Load splash image
gHelloWorld = SDL_LoadBMP("hello_world.bmp");

[Code] ....

I am using XCode 5, SDL2.0.1, OSX 10.9 Mavericks and C++.

View 2 Replies View Related

C Sharp :: Save Word File And Open It Using Net Framework

Apr 17, 2013

i have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly

it is the code

DocumentModel document1 = new DocumentModel();  
Section section1 = new Section(document1);
document1.Sections.Add(section1);  

[Code]....

View 1 Replies View Related

C++ :: Zlib Outputting Blank File?

Oct 30, 2014

I wrote a program to compress a file with gzip, which works fine. I also wrote a program to decompress the gzip file, which runs but outputs a blank file.

Code:

main.cpp:
#include "decompress.h"
int main(int argc, const char * argv[]) {
if(argc == 3) {
decompressor(argv[1], argv[2]);

[code].....

View 4 Replies View Related

C++ :: Draw 2D Grid With Blank Cells?

Mar 21, 2014

I am trying to draw a 2d grid array for a battleships game. I need the grid to have a border around each cell, how to do this. so far my code is:

#include<iostream>
using namespace std;
int main(){
int grid[5][5] = {{0}};

[Code] .....

View 4 Replies View Related

C++ :: Keep Looping Until User Enters A Blank Line?

Aug 4, 2013

My goal is to create a loop that keeps taking user input over and over until the user doesn't enter anything into 'cin >>', leaves the line blank, and simply presses the ENTER key to move on, at which point the program is supposed to break out of the loop and continue on with the rest of program execution. Something like this:

Code:
do {
cout << "
Enter a name: ";
cin >> input1;
if (input1.empty())

[Code] ....

As you can see, I've already tried using the empty() function, but that didn't work, the program simply stays in the loop and doesn't break out, no matter how many times I press enter. It just keeps prompting me to enter a name. I've also tried using something like

Code: if (input1 == "")

but that doesnt work either. How do I break out of this loop?

View 2 Replies View Related

C++ :: Code Compiles Successfully Yet Previous Day Is Blank

Feb 17, 2013

//#include "stdafx.h"
#include<iostream>
#include<cmath>

using namespace std;
//class declaration
class dayType{
public: int presday;

[Code] ....

So everything works perfectly, well not everything lol. Code compiles successfully without any errors but previous day does not calculate. In a sense that when it asks for number of previous days it returns a blank statement.

For example: Previous number day is: shows nothing

View 2 Replies View Related

C++ ::  No Compile Errors But Blank Screen On Execute?

Oct 23, 2013

I'm working on a Hash Table implementation and after fixing all the errors and finally getting it to compile and link correctly, I am met with a black screen upon execute.

main.cpp
#include <stdio.h>
#include <string.h>

[Code]....

I tried inserting a debug statement in the main() function to see, and it wouldn't even print out the message "debug me" on the screen.

I am using Code::Blocks on Windows with the mingw32-g++.exe compiler. Here is my build log:

mingw32-g++.exe -Wall -g -c D:MediaDesktopHashElement.cpp -o objDebugElement.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashHashTab.cpp -o objDebugHashTab.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashmain.cpp -o objDebugmain.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashStudent.cpp -o objDebugStudent.o
mingw32-g++.exe -o binDebugHash.exe objDebugElement.o
objDebugHashTab.o objDebugmain.o objDebugStudent.o -mwindows
Output size is 1.06 MB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings (0 minutes, 2 seconds)

View 11 Replies View Related

C++ :: Keep Looping Until User Enters A Blank Line?

Aug 4, 2013

So I've run into the following problem. My goal is to create a loop that keeps taking user input over and over until the user doesn't enter anything into 'cin >>', leaves the line blank, and simply presses the ENTER key to move on, at which point the program is supposed to break out of the loop and continue on with the rest of program execution. Something like this:

do {
cout << "
Enter a name: ";
cin >> input1;
if (input1.empty()) {

[Code] .....

As you can see, I've already tried using the empty() function, but that didn't work, the program simply stays in the loop and doesn't break out, no matter how many times I press enter. It just keeps prompting me to enter a name. I've also tried using something like

if (input1 == "")

but that doesn't work either. How do I break out of this loop?

View 1 Replies View Related

C# :: User Control Being Blank On Main Window

Jan 5, 2015

I have followed the tutorial here - [URL] .....

This is a tutorial that I have gone through completely with success, but now I am trying to create a different project using the same sort of setup.

When I add my usercontrol to the MainWindow it has none of the buttons/TextBlocks on which I have put on the UserControls - It is just a blank box. What could be causing this?

I have changed the name of the project to [snip] because it has a company name in it...

"NumericControl.xaml"
<UserControl x:Class="[snip].UserControl.View.NumericControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

[Code] ....

View 14 Replies View Related

C/C++ :: How To Put Element In Blank Cell Of Two Dimensional Array

Oct 2, 2013

I have already data in two dimensional matrix but some cell is empty.Now i want to put 0 in blank cell.

View 2 Replies View Related

C :: Bubble Sorting Failed - Prints A Blank Record

Feb 19, 2014

Well still working on my project, now the bubble sorting failed. For some reason the first slot in the array is empty and when I attempt to enter a record to access, it just crashes or prints a blank record. Here is my code for the viewing of the record and a SS of the empty array slot.

Code:
void searchRec(void) {
void Printing(int *ver, int *max);
FILE *fPtr;
struct Students vStudnt;
int set;
int ver;
int i = 0;
int fin = 0;
int sel;
char order;

[Code]...

Well I don't see why there is a empty slot, why?

View 6 Replies View Related

C++ :: How To Test A Compare Function With Parameter That Is Blank String

Feb 18, 2013

Modify your code by adding your own tests to see if your functions work right. Include at least 6 separate tests, of your choosing.

For example, test the compare function with the first parameter as a blank string -- then with the 2nd as a blank -- then both. Test compare with the first string shorter than the second -- then the other way around. Test your copy function with long strings.

I am struggling with how to use the compare function with a parameter as a blank string. I tried leaving the first parameter blank but doing ("",text) but I don't think that is the correct way of doing this.

#include <cstring>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

int myStrLen(const char[]); // return length of null-terminated string stored in char array

[Code] ....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved