public async Task CreateAsync(CreateEventInput input) { try { var @event = Event.Create(AbpSession.GetTenantId(), input.Title, input.Date, input.Description, input.MaxRegistrationCount); await _eventManager.CreateAsync(@event); } catch (Exception ex) { throw ex; } }
public async Task CreateAsync(CreateEventInput input) { var @event = Event.Create(AbpSession.GetTenantId(), input.Title, input.Date, input.Description, input.MaxRegistrationCount); await _eventManager.CreateAsync(@event); // TODO: Apply AOP -> all extension out of this app service class // TODO: Put conversion Guid <-> ObjectId in helper class //ObjectId.TryParse(@event.Id.ToString(), out ObjectId externalId); await _extension.SaveAsync(new ExtEvent { ExternalId = @event.Id, // TODO: Smash it to sucking automapper pls Location = new ExtLocation { Latitude = input.Location.Latitude, Longitude = input.Location.Longitude, RawAddress = input.Location.Address } }); }
public async Task Create(CreateEventInput input) { var tenantId = 0; try { tenantId = AbpSession.GetTenantId(); } catch (AbpException e) { Console.WriteLine(e); throw new UserFriendlyException("You cannot create an event logged as a host! Please log in as a tenant."); } if (tenantId == 0) { } var @event = Event.Create(tenantId, input.Title, input.Date.Date, input.Description, input.MaxRegistrationCount); await _eventManager.CreateAsync(@event); }
public async Task CreateAsync(CreateEventInput input) { var @event = CreekEvent.Create(AbpSession.GetTenantId(), input.Title, input.Date, input.Description, input.MaxRegistrationCount); await _eventManager.CreateAsync(@event); }