public void CreateNewApp(AppDto appDto) { ValidateParameter.Validate(appDto); var app = appDto.ConvertToModel<AppDto, App>(); var internalApp = new App(app.Name, app.IconUrl, app.AppUrl, app.Width, app.Height, app.AppTypeId, app.AppAuditState, app.AppStyle, app.AccountId, app.Remark, app.IsMax, app.IsFull, app.IsSetbar, app.IsOpenMax, app.IsFlash, app.IsDraw, app.IsResize); Repository.Create<App>().Add(internalApp); UnitOfWork.Commit(); }
public void ModifyAccountAppInfo(Int32 accountId, AppDto appDto) { ValidateParameter.Validate(accountId).Validate(appDto); AppContext.ModifyAppInfoServices.ModifyAccountAppInfo(accountId, appDto.ConvertToModel<AppDto, App>()); UnitOfWork.Commit(); }