Note that there are some explanatory texts on larger screens.

plurals
  1. POImprovement of the NerdDinner application ASP.NET MVC 2
    text
    copied!<p>I created an application based on ASP.NET MVC 2 using the popular NerdDinner tutorial provides an easy way for people to find and organize dinners online. I wish in some way to develop this service by adding a few features. This is my first real contact with the programming. I would ask for any hints or suggestions. I have no experience so please bear with me :) Thanks in advance. </p> <p>1.In NerdDinner application we have in the model class DinnerRepository with query method like below:</p> <pre><code>public class DinnerRepository { private NerdDinnerEntities entities = new NerdDinnerEntities(); // // Query Methods public IQueryable&lt;Dinner&gt; FindAllDinners() { return entities.Dinners; } public IQueryable&lt;Dinner&gt; FindUpcomingDinners() { return from dinner in entities.Dinners where dinner.EventDate &gt; DateTime.Now orderby dinner.EventDate select dinner; } } </code></pre> <p>Is it possible to return the value of a given row of the table (in the above code we get the whole, sorted table). For example something like this:</p> <pre><code>return from dinner in entities.Dinners WHERE dinner.EventDate like '% 2011-11-28 12:00:01%' orderby dinner.EventDate select dinner; </code></pre> <p>or <code>dinner.Category = ‘something’</code>. </p> <p>I tried to do this, but it did not work. It will be helpful for me to create a dropdownlist(create and edit method) for different categories of dinners.</p> <p>2.Adding a language panel. At the top we have the possibility to change the language on the whole website.</p> <p>3.Sending a confirmation email for people who have confirmed participation in the meeting. Mail (PDF?) would be generated from the value stored in the database about the meeting and the persons taking part in it. (Maybe database trigger?).</p> <hr> <p><strong>UPDATE:</strong><br> Thank you for your response. It was helpful.</p> <p>Regarding question number 3, I have no idea how to do it. I would be very grateful for any tutorials, examples of solutions, etc. I changed the <strong>NerdDinner</strong> project for my own use in webservice that supports bar.</p> <p>In short, the case looks like this:</p> <p>I have two tables: one containing information about a particular dish, the second one contains the ID of the dishes and the name of the person ordering (username of the person logged into the service). The tables are linked by foreign key. Ordering is done by <strong>ActionLink</strong> on the page. After clicking, table of orders is then updated.</p> <p>I'd like to, on this basis, sent an email to the person who ordered the dish, that contains information about it. Why database trigger is a bad solution?</p> <p>At this moment I have only implemented an email confirmation for the registration, but I do not think it will be useful. Creating something like this is very difficult? I ask because I'm not specifically familiar with ASP.NET.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload