MVC :: Where To Get Sample Pattern Explanation
Oct 9, 2010i need MVC pattern with sample example....
View 1 Repliesi need MVC pattern with sample example....
View 1 RepliesWe have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. What I'm wondering is how others have implemented navigation of complex object graphs with these patterns. Let me give an example from one of our controllers:
[code]....
It's a registration process and pretty much everything hangs off the POCO class Person. In this case we're caching the person through the registration process. I've now started implementing the latter part of the registration process which requires access to data deeper in the object graph. Specifically DPA data which hangs off Legal inside Country.
The code above is just mapping out the model information into a simpler format for the ViewModel. My question is do you consider this fairly deep navigation of the graph good practice or would you abstract out the retrieval of the objects further down the graph into repositories?
Does anyone have a working pattern for converting a GET-POST-GET pattern to asny?
I'm encountering the following issues:
1. You cannot mix Sync and Async action methods SubmitForm(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() ... (because the resolver gets all confused ... it doesn't use the HTTP verb to decide who to target. BTW: I think that's poor design, or a bug)
2. Renaming the get method name to something else eg: SubmitFormConfirmation(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() would be very awkward if it works ... because you have to doctor the <form markup to specify an action name.
3. You cannot give them all async names SubmitFormAsync(), SubmitFormAsync(bool? confirm), submitFormCompleted(), because the call just keeps malfunctioning. It sometime even behaves as if you are requesting a delete of something.
Can someone give an insight from an actually working sample.
Now that the next version of ASP.NET MVC is being prototyped and previewed (ASP.NET MVC 3 Preview 1 came out a couple of weeks ago), I wonder if we should call the attention of the Core Dev team (S Hanselman, Phil Haack and all) to this "feature."there a easy/non tacky way of associating subdomains → areas?Something like:
[URL]Also, whats the best accepted design pattern in implementing PRG pattern in ASP.NET MVC? I guess it should also get some official loving in MVC 3.
I read this
[URL]
and I was wondering if there's anyone that can explain to me what Prerender should do, for example for a button or a calendar component.
I can't imagine it; can you show me few lines?
How should we use ClientIDMode property that comes with asp.net 4.0?... When i should i use one over the other clientIdModes?
View 1 RepliesRecently I was asked to express the DI in colloquial explanation.
I answered :
1)I am going to a hotel.I ordered food.The hotel management asks me to clean the plates and
clean the tables.So here i am a client,I am responsible for managing the service (Instantiating,executing,disposing).But DI decouples such tasks so the service consumer no need not worry about controlling the life cycle of the service.
2)He also asked is there any microsoft API follows DI ?.I answered (This was my guess) In WCF you can create a Proxy using ChannelFactory that controls the life time of your factory.
for item (1) he said only 10% is correct
for item(2) he said that is factory pattern not dependency injection.
Actually what went wrong in my explanation (apart from my bad English) ? What is the real answers for those?
I am trying to unable the asp.net so that i can dev on windows azure, unfortunately going through windows features(in win7) to install it, always prompts and error with no explanation whatsoever. its the "an error has occured, some programs may not have been changed sucessfully" or something similar to that.I have tried uninstalling IIS and reinstalling afterwords, and have tried removing WAS.
View 4 RepliesI've been looking on the Internet for a fairly clear explanation of the different methods of registering javascript in an asp.net application. I think I have a basic understating of the difference between registerStartupScript and registerClientScriptBlock (the main difference being where in the form the script is inserted).I'm not sure I understand what the RegisterClientScriptInclude method does or when it is used. From what I can gather, it is used to register an external .js file. Does this then make any and all javascript functions in that file available to the aspx page it was registered on? For example, if it was registered in the onLoad event of a master page, would all pages using that master page be able to use the javascript functions in the .js file? What problems would arise when trying to use document.getElementById in this case, if any? Also, when it is necessary/advantageous to use multiple .js files and register them separately?
View 1 RepliesHregarding to following query:
Use AdventureWorks
Go
ELECT p.ProductID,
piy.ProductID
What does mean ON 1 = 1 in this query??
I am a total newbie in the oAuth area and have set up DotNetOpenAuth to set up an oAuth Service provider. The sample provided in the DotNetOpenAuth download is quite confusing for me...maybe cos i am new to this stuff. There is one default page that creates a database and populates the database. Now I browse to the login.aspx and it asks me to put an openid, actually I want to use DNN (which implements DotNetOpenAuth) and i want to use those credentials on another site which will be the oAuth consumer. Can someone explain how to test the oAuth Service provider in the samples of DotNetOpenAuth?
View 1 RepliesSeems like a basic question but im looking for an article that can give a good solid overview of how a page in asp.net works.
What im looking for in specific is how variables react on postback and stuff like that. For example if I bind an Asp.net control to the page, do I need to rebind it every time the page is refreshed? And what if its a postback, do page variables get preserved across postbacks.
i need clear expition for authentication and authorization in .net
View 3 Replieswhat the two following options in the publish dialog are for when publishing a site? I just required to know in what situation these will be use.
1) "Allow this precompiled site to be updatable"
2) "Used fixed naming and single page assemblies"
3) "Emit Debug information"
4) "Enable strong naming on precompiled assemblies"
explain reasons why the name property of a Repeater control's child controls would be generated differently in an ASP.NET application when it is deployed on different IIS servers?
One some IIS servers the Name is generated using the format:
String.Format("{0}:_ctl{1:00}:{2}", RepeaterControlID, itemIndex, ChildControlID);
e.g.
<input name="Mntc_Software_List:_ctl1:id" id="Mntc_Software_List__ctl1_id" type="hidden" value="1772" />
and on other IIS servers the format is:
String.Format("{0}$ctl{1}${2}", RepeaterControlID, itemIndex, ChildControlID);
e.g.
<input name="Mntc_Software_List$ctl01$id" type="hidden" id="Mntc_Software_List_ctl01_id" value="1772" />
ASP.Net page life cycle events with code example C#
View 1 RepliesCannot find an explanation of the AJAX CalendarExtender's attribute animated.
What does this do exactly?
I am trying to get a handle on Solrnet and interacting an ASP.NET site with a Solr server. However, the sample app (on the code repository) is MVC based ,does anyone know of a version in plain vanilla ASP.NET?
View 1 RepliesI want good sample about instruction SMTP
View 3 RepliesI am looking for refference as below case.1) I am looking for some sample which demonstrate reusebility in following senarion. I am having three master entry forms in the hirarchy asEmployee MAster Area Master Group Master In this senarion Master 2 & 3 are reused with some different view then its base form in new MAster form that is 1) Employee Master. My ques areQ.1) Can I reuse Master 2& 3 in Master 1 with implementation of new view which can be work in conjunction with other fields of 1) Employess Master?
Q. Where can I find any sample presenting this level of reusebility?Q.3) Does my requirement matches the feature available with ASP.NET MVC 3 or not?Note: I do not want to use Prism or other comopsite technology because of non availibiliy of skill persons with these tech. So I want to use simple ASP.NET MVC 3 Fundamentas to reach this level of reusebility.
Is there any way to read the prt file with sample data like that and seperate headers and take the data from the file. Sample prt file data - Sample.prt Item Sub Group :..............................
View 4 Replieshow to implement geneology in asp.net with sample code
View 1 RepliesThere are sample codes on the net for OpenId Client but none for OpenId Server. Do you know some? I know about dotnetopenAuth but there seem to be no tut on how to use as OpenId Provider. I don't even know if it can do that. Maybe it can just be used to create openid consumer app.
View 1 RepliesGood sample for dynamically change theme in MVC 3 RC 2 (Razor).
View 1 RepliesDoes MS have a sample enterprise application that demonstrates the use of different Enterprise library blocks (Logging, Dataaccess, Exception, Validation etc)? I am looking for something that uses best practices in using and integrating all these blocks in a single application.
View 3 Replies