常用方法
常用方法
常用方法
常用方法
public List <SelectListItem> GetOwnersAsSelectListItems() { var owners = _animalService.GetAllOwnersSortedByName().Select(x => new SelectListItem { Text = x.FullName, Value = x.Id.ToString() }).ToList(); owners.Insert(0, new SelectListItem() { Text = "Niemand", Value = "0" }); return(owners); }