public void AddLogo(LogoDto logoDto) { if (logoDto == null) { throw new Exception("LogoDto is null"); } Logos.Add(logoDto); }
public IResult UpdateLogo(LogoDto logoDto) { var generalInformation = _generalInformationDal.GetAll().SingleOrDefault(); var generalInformationNew = Mapper.Map <LogoDto, GeneralInformation>(logoDto, generalInformation); _generalInformationDal.Update(generalInformationNew); return(new SuccessResult()); }
public async Task UpsertLogo(LogoDto input) { try { var obj = input.MapTo <Logo>(); if (input.Id == 0) { obj.IsDeleted = false; obj.CreatedBy = AbpSession.UserId; obj.DateCreated = DateTime.Now; obj.DateModified = null; } else { obj.ModifiedBy = AbpSession.UserId; obj.DateModified = DateTime.Now; } await _logoRepository.InsertOrUpdateAsync(obj); } catch (Exception ex) { throw ex; } }
public IResult InsertOrUpdate(LogoDto logoDto) { throw new NotImplementedException(); }
public LogoViewModel(LogoDto output) { output.MapTo(this); }