Skip to content
Permalink
2bf5d8640a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
40 lines (36 sloc) 1.5 KB
using groupH_M32COM.Angular.DatabaseClasses;
using groupH_M32COM.Angular.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace groupH_M32COM.Angular.DTO
{
public class EventsDTO
{
public int ID { get; set; }
public string Description { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public Location Location { get; set; }
public int LocationID { get; set; }
public BoatModel EventType { get; set; }
public List<Promotion> Promotions { get; set; }
public List<EventPrize> Notes { get; set; }
public List<BoatDTO> RegisterdBoats { get; set; }
public BoatDTO WinningBoat { get; set; }
public void Inflate(Event eventDetails,RCBoatRepository repo)
{
this.ID = eventDetails.ID;
this.Description = eventDetails.Description;
this.StartDate = eventDetails.StartDate;
this.EndDate = eventDetails.End_Date;
this.Location = eventDetails.Location;
this.EventType = eventDetails.EventType;
//this.Promotions = eventDetails.Promotions.ToList();
//this.Notes = eventDetails.Prizes.ToList();
//this.RegisterdBoats = eventDetails.Boats.Select(x => { var boat = new BoatDTO();boat.Inflate(x); return boat; }).ToList();
//this.WinningBoat = repo.GetBoatDTO(eventDetails.WinningBoatId);
}
}
}