Beispiel #1
0
            public string Add(EventAddDto model)
            {
                Event entity = new Event
                {
                    Id        = Guid.NewGuid(),
                    CreatedAt = DateTime.UtcNow
                };

                entity.Name       = model.Name;
                entity.StartDate  = model.StartDate;
                entity.FinishDate = model.FinishDate;
                entity.Address    = model.Address;
                entity.IsFree     = model.IsFree;
                entity.Price      = model.Price;
                entity.Subject    = model.Subject;
                entity.Desc       = model.Desc;

                data.Add(entity);

                return("eklendi.");
            }
Beispiel #2
0
            public IActionResult Add([FromBody] EventAddDto model)
            {
                var result = _eventService.Add(model);

                return(Ok(result));
            }