Permalink
Cannot retrieve contributors at this time
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?
groupH_M32COM/Code/groupH_M32COM.Angular/DTO/EventsDTO.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (36 sloc)
1.5 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} | |
} | |