public async Task AddAsync(UserLogModel userLogModel) { var userLogDomain = UserLogDomainFactory.Create(userLogModel); userLogDomain.Add(); var userLogEntity = UserLogEntityFactory.Create(userLogDomain); await UserLogRepository.AddAsync(userLogEntity); await DatabaseUnitOfWork.SaveChangesAsync(); }
public async Task AddAsync(AddUserLogModel addUserLogModel) { var validation = new AddUserLogModelValidator().Valid(addUserLogModel); if (!validation.Success) { return; } var userLogDomain = UserLogDomainFactory.Create(addUserLogModel); userLogDomain.Add(); var userLogEntity = UserLogEntityFactory.Create(userLogDomain); await UserLogRepository.AddAsync(userLogEntity); await DatabaseUnitOfWork.SaveChangesAsync(); }