public VisitDto Add(VisitDto visit) { // Log.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name + // "() traced. Added visit: " + visit.Title + // " from " + visit.Date); return _repo.AddVisit(visit); }
private static void AddVisit() { Console.Write("Visit title: "); string title = Console.ReadLine(); Console.Write("Date: "); DateTime date = DateTime.Parse(Console.ReadLine()); Console.Write("Organiser ID: "); int organiserId = int.Parse(Console.ReadLine()); DateTime createdOn = DateTime.Now; VisitDto visit = new VisitDto { Title = title, Date = date, OrganiserId = organiserId, CreatedOn = createdOn }; Console.WriteLine(visit.Date); visitsRepository.AddVisit(visit); //Mapper.CreateMap<Client, ClientViewModel>(); //ClientViewModel cvm = Mapper.Map<Client, ClientViewModel>(client); //Console.WriteLine(cvm.ClientCode); }
public VisitDto UpdateVisit(VisitDto visit) { return _repo.UpdateVisit(visit); }