Any way to automatic update controller and view code once model got updated - Already developed MVC application? - sql-server

I have one ASP.Net MVC data base first application. Due to some enhancement work came in I have to do modification to my DB tables and Add couple of new table as well.
I saw few tutorial and you tube videos. I found, they are deleting the existing model and controller -> changing the DB schema [adding SP etc...] -> then again adding new model and controller etc. However, I think, this is not the correct approach as my application is bit big[already on production], I can not delete everything and adding again back.
How can I do it? Is that MVC does not provide something so that I can update it from Visual Studio or refresh it so that my changes will affect? Any link would help. Hope my explanation is understood-able.
Along with I also wanted to know, is there any thing else I need to take care for these kind of enhancement?
Any disadvantage of using ASP.NET MVC?
Thanks.

Double click on .edmx file(added in models folder) to open it.Then right click on it and select update model from database and then press ctrl+s to save it.

Related

When creating a microsoft forms trigger in a logic app I can only see forms I created

Sorry in advance if this question seems naïve.
I'm currently trying to configure a logic app that triggers based on a form being submitted via Microsoft Forms.
This form is located in one of my organizations groups (which my user has access to). When attempting to create the trigger the only forms I can see in the dropdown are ones that I created myself and are under My Forms in microsoft forms.
I'm unsure of the steps to make the form visible / available so I can create a trigger for it. Any help would be appreciated. FYI the logic app is going to be used to create a work item based on the form submission.
Ok I found the answer, not sure why I didn't catch this the first time I read this.

Referencing Another App

What is the best way to reference another app in the visual query designer?
I am using the blog app and I created a second app to list the tags that are used in the main blog app. This way when the app goes to a detail page of a post, I can still have the tags listed on the website without the view changing automatically. I set up my blog tags app with a visual query that list all of the tags used in the main app. Everything was working fine in development.
The problem that I have run into is that when I move the app to a production site the AppId was different than the one I was currently using and development. Now, the tags app is showing an error and I am not able to get into the settings to change the app ID of the visual query to the proper one in order to get the information needed. Is there a better way that I should be handling this?
This sounds like the right way to do it - your main issues is getting into the admin-ui when the template you have shows an error.
I suggest that you quickly rename your current template (so it's not used till you fix the bug) and create an empty template with the original name. This way you can go to the normal settings.
Another option is to switch into dnn-edit-mode, and use the black-dnn buttons to get to app-admin.

mvc post list with number of record not working

I am using MVC architecture for my application.
Now, I have more than 1000 record which i am binding on Listbox.kindly check below screen shot.
Here, Left side list have more than 1000 records and my functionality is, User should select any record and move it to right side ListBox.
it;s work on my local system but when i deploy on iis6 web server it's giving me error. kindly check below image for error.
and also suppose i use less than 500 records.same functionality working properly.
so, i have to make changes on IIS or code or any limitation to post record on mvc?
Check Stack Trace
Looks like you are doing DoS attack on yourself. I think that you have 2 options:
alter web config(ref. http://geekswithblogs.net/renso/archive/2012/01/19/operation-is-not-valid-due-to-the-current-state-of.aspx):
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2000" /></appSettings>
dont post whole form, just the part with data you need(carriers to be added). Either using jquery, or adding only fields to be posted inside form tag.

Inserting entity object data in database using Oracle ADF

I am thoroughly new to the Oracle ADF technology. I have dropped an entity view object from the Data Control Palette to a jspx page, and created an adf creation form from it. I am not understanding how the information input in the form will reflect in the database. Pls help.
PS: The new row is getting added in the adf read-only table which I have added on the same page
I would suggest you learn how the technology works. This is a LARGE ORM/UI framework and needs to be learned.
There is a lot of free training here, here and here.
I also recommend this book.
There's even a Getting Started with ADF (via google) Page here.
User
When you drop a viewObject based on entityObject on page then you are able to perform DML operation on that
To create new row drop createInsert operation from DataControl and make readOnly false for table inorder to inputValue or use a form
then drop commit operation from DataControl on page .
After entering records press commit button to save it in DB
Data is validated through binding layer and committed to DB from model itlsef
Check these blog for more information-
http://se7so.blogspot.in/2014/02/sample-adf-crud-web-application.html
http://andrejusb.blogspot.in/2009/11/crud-operations-in-jdeveloperadf-11g-r1.html
Ashish

Silverlight 4: Fields disapear in data grid after saving en

When saving a new entity something strange happens...
I have a data grid with a list of 'Depots' populated using a domain data source.
When the user wants to add a new 'Depot' this is what happens:
Depot newDepot = new Depot();
newDepot.Name = "My New Depot";
EditDepot popup = new EditDepot(newDepot); // create the popup and pass the newly created Depot
domainDataSource.DataView.Add(newDepot); // add a new Depot to the datagrid
// handle the popup events
popup.CancelClick += (cancelSender, cancelArgs) =>
{
if (GridDataSource.DataView.Contains(newDepot))
domainDataSource.DataView.Remove(newDepot);
domainDataSource.DomainContext.RejectChanges();
};
popup.Show();
The popup constructor then passes the entity to a viewmodel. The viewmodel constructor then creates a new instance of 'ContactInfo', another entity which is linked to 'Depot' (Depot.ContactInfo). After filling in a few properties, the 'Depot' is assigned to a property in the viewmodel and a dataform is used to edit the data. Once the user is happy with the content they will press save. The Depot is added to the context (Context.Depots.Add....) and then the changes are submitted. (It's also worth noting I have tried added the ContactInfo item to the context too, with no joy). The data is saved to the database (via WCF) and everything appears to have worked correctly. The proplem is the datagrid is not displaying the ContactInfo fields, where as it did before the save. As the user edits the data, you can see the datagrid populated behind the popup. If the user refreshes, the data returns. This problem does not happen when the entity is editied.
Now, to throw another spanner in the works... This doesn't happen on all our machines...
We have a build machine and the output does have this problem, however one machine in the building builds a version which does not have this problem! After some investigation, we have found that it appears to be the version of WCF RIA Services. On my machine, I had V1.0 SP1. I Tried V1.0 SP2 and still had the same problem. Now on the machine that works, WCF RIA Services SP1 Beta was installed. After he unistalled this, and installed SP2, the problem occured on his machine.
So, we are relutant to use a beta version in our final release, but unless we can fix this issue we wont have a choice. Does anyone have any ideas? Has anyone seen this issue before?
I have also tried different version of the WCF toolkit with no joy
EDIT: I've created a simple project to show you whats happening
The project retrieves a load of entities and tries to add one. You'll notice the the 'InnerThing' properties dissapear.
Link to project
the issue was that the key property was being set in the insert method in the service.
it looks like this change was not reflected in the client. Changing other properties in the service after submit other than the key did work however.

Resources