コード例 #1
0
        public ResponseAddWindow AddWindow(RequestAddWindow request)
        {
            var imagePath = SaveImageToWorksampleDirectory(request.FileName, request.FileData, CATALOG_DIRECTORY);

            var item = new WindowPlastic()
            {
                Feature  = request.Feature,
                HasSetup = request.HasSetup,
                ImageUrl = imagePath,
                Name     = request.Name,
                Size     = request.Size,
                Total    = request.Total
            };

            dbManager.AddNewWindowPlastics(item);

            return(new ResponseAddWindow());
        }
コード例 #2
0
ファイル: DBManager.cs プロジェクト: vanavaraVL/Ceresis
 public void UpdateWindowPlastic(WindowPlastic item)
 {
     repository.WindowPlastics.DbSet.Update(item);
     repository.SaveChanges();
 }
コード例 #3
0
ファイル: DBManager.cs プロジェクト: vanavaraVL/Ceresis
 public void AddNewWindowPlastics(WindowPlastic item)
 {
     repository.WindowPlastics.DbSet.Add(item);
     repository.SaveChanges();
 }