public static AssetNoSql Create(IAsset source) { var item = new AssetNoSql() { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(source.Id), Asset = AssetModel.Create(source) }; return(item); }
public ActionResult Create([Bind(Include = "assetId,assetSubcategoryId,dossierId,receivable,payable,description")] AssetModel asset) { if (ModelState.IsValid) { //db.assets.Add(asset); //db.SaveChanges(); //AssetModel asset.Create(); return(RedirectToAction("Index", new { dossierId = asset.dossierId })); } ViewBag.dossierId = new SelectList(db.dossiers, "dossierId", "dossierName", asset.dossierId); return(View(asset)); }