Lukket

SubSonic 3 and LINQ - 1 Hr Help

Hello,

I'm a SubSonic 2.0 veteran now using SubSonic 3.0 with LINQ.

I need just 1 hour of help with a 3 data access calls.

See code below in the full description.

Requirements:

1. I will host a Go2Meeting, I need you to join

2. Call in or skype me

3. Talk me through what I did wrong

4. One of the lookups need to select records from the DB at random

## Deliverables

I will provide the full solution after the bid is over.

**public static IList<EventListing> FeaturedEvents(int Max)**

{

var DB = new ThisTicketComDBDB();

var qry = [url removed, login to view]("EventListing").OrderDesc("CreatedOn");

// TODO LIMIT TO TOP 5 RESULTS

// TODO get random events

//[url removed, login to view] = "5";

var events = [url removed, login to view]<EventListing>();

return events;

}

**public static IList<EventListing> TopEventsPerDate(DateTime SelectedDate, int Max)**

{

var DB = new ThisTicketComDBDB();

// SELECT @

// FROM [v_EventTimePerDate]

// where [StartTime] = @SelectedDate

// TO DO

// in the database there is a view: v_EventTimePerDate

var qry = [url removed, login to view]("EventListing").OrderDesc("CreatedOn").Where("StartTime", [url removed, login to view],

[url removed, login to view](-1));

// TODO LIMIT TO TOP (based on Max) RESULTS

// where StartTime is the same date as SelectedDate

//[url removed, login to view] = "5";

var events = [url removed, login to view]<EventListing>();

return events;

}

p**ublic static object GetDistinctListOfCategories()**

{

//TO DO REFACTOR THIS!

// only select the Category from the db, not the full record

IList<string> categories = new List<string>();

foreach (EventListing eventListing in [url removed, login to view]())

{

if (![url removed, login to view]([url removed, login to view]) && ![url removed, login to view]([url removed, login to view]))

[url removed, login to view]([url removed, login to view]);

}

return categories;

}

Evner: Linux, Script Installering, Shell Script, Software Arkitektur, UNIX

Se mere: $22 hr, refactor code, max p, todo list, refactor, qry, hr solution, category object, add record linq, skype linux, datetime, skype linq, max help, events host, help access code, talk random, random string, skype install, linq contains, skype linux script

Om arbejdsgiveren:
( 74 bedømmelser ) Prague , United States

Projekt ID: #3329991