AssocAddEdit.Controllers.Manager.ManufacturerGetAll C# (CSharp) Метод

ManufacturerGetAll() публичный Метод

public ManufacturerGetAll ( ) : IEnumerable
Результат IEnumerable
        public IEnumerable<ManufacturerBase> ManufacturerGetAll()
        {
            return Mapper.Map<IEnumerable<ManufacturerBase>>(ds.Manufacturers.OrderBy(m => m.Name));
        }

Usage Example

        // Attention 31 - Build the data for the HTML Form, for "add new" vehicle
        // GET: Vehicles/Create
        public ActionResult Create()
        {
            // Create a form
            var form = new VehicleAddForm();

            // Configure the SelectList for the item-selection element on the HTML Form
            form.ManufacturerList = new SelectList(m.ManufacturerGetAll(), "Id", "Name");

            return(View(form));
        }