ScottinTexas's Profile User Rating: -----

Reputation: 1 Apprentice
Active Members
Active Posts:
79 (0.06 per day)
13-March 12
Profile Views:
Last Active:
User is offline May 02 2015 12:28 PM

Previous Fields

Who Cares
OS Preference:
Who Cares
Favorite Browser:
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Dream Kudos:
Icon   ScottinTexas has not set their status

Posts I've Made

  1. In Topic: Split text into sentences and load a list

    Posted 2 May 2015

    Never mind. I just realized what I was doing wrong with my Ingredient Object. I changed the foreach loop to this
            string[] ingArray = ViewBag.ingredients.Split("\n");
    	foreach (var r in ingArray)
    	Ingredient ing=new Ingredient();
    	ing.Description = r.ToString();

    Now all I have to do is figure out how to put the text in the textarea into the ViewBag.
  2. In Topic: use of HashSet and ICollection for foreign key relationship in classes

    Posted 30 Apr 2015

    As I understand it the constructor establishes courses as a IEnumerable list of object course but it is empty. Hashset is restricted to unique items. The navigation code in your class is set to "lazy" loading and is loaded when needed in use and results in loading a collection of course objects that fit into the Hashset. It has to be an ICollection to expose methods such as Add, Delete, Enumerate, etc. as you said. Why they are different is beyond me. It looks like you have it as much as I did.

    I may not have all this exactly right in the eyes of the Gurus. But then the Gurus don't come to this forum very often. It makes me wonder if ASP.Net, MVC is dead. I went through the same thing as your question not too long ago. I had to do a lot of reading to get that much understanding.

    Hope this helps you.
  3. In Topic: Unhandled Exception RE: Time

    Posted 20 Mar 2015

    It's the initializer for the SQL database that gets created when the entity framework does it's thing.

    			var recipes=new List<Recipe>{
    				new Recipe{PhotoPath="Path goes here",Title="Easy Cheesy Mac-N-Cheese",Author="Guy Fieri", Description="Mac N Cheese for adults", PrepTime=DateTime.Parse("10:00"), CookTime=DateTime.Parse("50:00"), CategoryID=1, CaloriesPerServing=125.7F, Servings=8, ServingSize="12 oz", DateAdded=DateTime.Now, Directions="Preheat oven to 350 degrees F. Place shallots and garlic in a small aluminum foil pouch and drizzle with olive oil. Roast 20 to 30 minutes or until tender. Remove from foil and chop. In a large sauce pan, reheat reserved bacon fat over medium heat. Add roasted shallot and garlic. Saute for 1 minute, Add flour and stir for 1 minute. Whisk in heavy cream and thyme. Reduce by 1/3. Stir in cheeses until melted, creamy and thickened. Season to taste with salt and perpper. Remove from heat and gently stir in cooked pasta. Place in a 9X13 casserole dish. In a small bow mix bread crumbs, melted butter, bacon and parsley. Sprinkle mixture over Mac and Cheese and bake at the same temperature for 20 to 30 minutes until lightly browned and bubbling."}
    			recipes.ForEach(r => context.Recipes.Add(r));

    Italics and bold used for emphasis. Not actually in my code.
  4. In Topic: Need help with getting data to a list

    Posted 9 Mar 2015

    View PosttlhIn`toq, on 20 February 2015 - 07:00 AM, said:

    The timing on this thread and my post on another thread are just so close I have to ask... Is this based on my post here?

    No it wasn't. I started this because my brother was telling me about his movie library he is trying to keep in Excel. I had just started looking at a C# application for my work (petroleum landman) and his subject seemed like an easier starting project than the one I was about to tackle. My program was going to evolve from my VBA project I had done s few years ago with Access. So I figured I would start with a simpler data base and work through that to get the background I needed to start on the "Big Project". At the same time I was thinking of doing my flight log book would be a great starting point, but even that has several tables that have to be linked when gathering a single record. I thought the Movie library would have fewer linked tables and if I could get through that, then everything else is just an expansion of that.

    When I ask questions on this forum I look for your input specifically. I appreciate the way you answer questions without an underlying sense of superiority and the rest of us are just stupid dweebs trying to be super programmers. Well, I am trying to be a super programmer, but then I also want to fly without an airplane. I'll let you know how that goes.
  5. In Topic: I want to include an image file in my Model class

    Posted 19 Feb 2015

    View Postdemausdauth, on 04 February 2015 - 11:01 AM, said:

    If you are going to be displaying images on a webpage - it would probably be better to have your model supply the path rather than the actual file.

    OK. That's what I was thinking. The table will have a fileName that points to a local jpg. So I guess all I need is a string property to get and set a path to the file. Then when I load the view I just pull in a jpg.


    I think I got it.

My Information

Member Title:
D.I.C Head
Age Unknown
April 23
Years Programming:
Programming Languages:

Contact Information



ScottinTexas hasn't added any friends yet.


ScottinTexas has no profile comments yet. Why not say hello?