//GET: /Account/Invoices/{id} public async Task <ActionResult> Invoices(Guid id) { Response.AppendHeader("guid", id.ToString()); using (var context = await GetCrmContext()) { var query = new AccountQuery(context); var model = query.GetItem(id); var viewModel = new AccountReadViewModel { Title = model.Name, Breadcrumb = new Breadcrumb(), Account = model, EditButton = ButtonViewModel.Create( ButtonViewModel.Edit, "Account", Url.Action("Edit", "Account", new { id = model.Id })) }; return(View(viewModel)); } }
public void CRM_Query_Account_GetParent() { var acc = query.GetItem(child); Assert.AreEqual(parent, acc.ParentAccountId); }