public async Task <ActionResult> Edit(Project project, HttpPostedFileBase[] files, int[] TechnologyID)
        {
            if (ModelState.IsValid)
            {
                DbAdaptor dbAdaptor = new DbAdaptor();
                Image     img       = null;
                foreach (var file in files)
                {
                    if (file != null)
                    {
                        img = new Image {
                            ImageData = new byte[file.ContentLength], ImageMimeType = file.ContentType,
                        };
                        file.InputStream.Read(img.ImageData, 0, file.ContentLength);
                        img.ProjectID = project.ProjectID;
                        await DbAdaptor.CreateImageAsync(img);
                    }
                }

                if (TechnologyID != null)
                {
                    foreach (var elem in TechnologyID)
                    {
                        await DbAdaptor.CreateProjectTechnologyAsync(new ProjectTechnology
                        {
                            ProjectID    = project.ProjectID,
                            TechnologyID = elem,
                        });
                    }
                }

                await DbAdaptor.EditProjectAsync(project);

                return(RedirectToAction("Index"));
            }

            ViewBag.Lang = new SelectList(new List <SelectListItem> {
                new SelectListItem {
                    Text = "en", Value = "en"
                },
                new SelectListItem {
                    Text = "ru", Value = "ru"
                },
                new SelectListItem {
                    Text = "am", Value = "am"
                },
            },
                                          "Value", "Text");
            return(View(project));
        }