Esempio n. 1
0
        public void UpdateAppSpecification(AppSpecificationDataContract appSpecification)
        {
            AppBiz.UpdatePartially(appSpecification.ToApp()
                                   , a => a.Name
                                   , a => a.Price
                                   , a => a.AppCategoryId
                                   , a => a.Description);

            _context.SaveChanges();
        }
Esempio n. 2
0
 public static App ToApp(this AppSpecificationDataContract appSpecification)
 {
     return(new App()
     {
         Id = appSpecification.AppId,
         Guid = appSpecification.Guid,
         Name = appSpecification.Name,
         Description = appSpecification.Description,
         Price = appSpecification.Price,
         AppCategoryId = appSpecification.CategoryId
     });
 }
Esempio n. 3
0
        public static AppSpecificationDataContract ToAppSpecificationDataContract(this App app)
        {
            var appSpecification = new AppSpecificationDataContract()
            {
                AppId       = app.Id,
                Guid        = app.Guid,
                Name        = app.Name,
                Description = app.Description,
                Price       = app.Price,
                CategoryId  = app.AppCategoryId,
            };

            return(appSpecification);
        }
Esempio n. 4
0
        public AppSpecificationDataContract RegisterAppSpecification(AppSpecificationDataContract appSpecificationDataContract, int developerId)
        {
            var app = appSpecificationDataContract.ToApp();

            // set app intial state
            app.State       = AppState.Incomplete;
            app.Guid        = Guid.NewGuid();
            app.DeveloperId = developerId;
            // register app
            var savedApp = AppBiz.Create(app);

            _context.SaveChanges();

            return(savedApp.ToAppSpecificationDataContract());
        }
Esempio n. 5
0
 public static AppSpecification ToAppSpecification(this AppSpecificationDataContract appSpecificationDataContract)
 {
     return(new AppSpecification()
     {
         AppId = appSpecificationDataContract.AppId,
         Guid = appSpecificationDataContract.Guid,
         AppType = appSpecificationDataContract.AppType,
         CategoryId = appSpecificationDataContract.CategoryId,
         Description = appSpecificationDataContract.Description,
         Price = appSpecificationDataContract.Price,
         Name = appSpecificationDataContract.Name,
         DownloadsCount = appSpecificationDataContract.DownloadsCount,
         CommentsCount = appSpecificationDataContract.CommentsCount,
         DesktopScreenshotsCount = appSpecificationDataContract.DesktopScreenshotsCount,
         MobileScreenshotsCount = appSpecificationDataContract.MobileScreenshotsCount,
         State = appSpecificationDataContract.State
     });
 }
Esempio n. 6
0
 public Task UpdateAppSpecificationAsync(AppSpecificationDataContract appSpecification)
 {
     throw new NotImplementedException();
 }
Esempio n. 7
0
 public Task <AppSpecificationDataContract> RegisterAppSpecificationAsync(AppSpecificationDataContract appSpecification)
 {
     throw new NotImplementedException();
 }
Esempio n. 8
0
 public void UpdateAppSpecification(AppSpecificationDataContract appSpecification)
 {
     AppDomainService.UpdateAppSpecification(appSpecification);
 }
Esempio n. 9
0
 public AppSpecificationDataContract RegisterAppSpecification(AppSpecificationDataContract appSpecification)
 {
     return(AppDomainService.RegisterAppSpecification(appSpecification, Principal.CurrentUser.UserId));
 }