我的模型如下:
winrt::Windows::Storage::StorageFile nextFile = nullptr;
winrt::microsoft::Graphics::Canvas::Svg::CanvasSvgDocument nextSvg = nullptr;
winrt::Windows::Storage::Streams::IRandomaccessStream fileStream = nullptr;
nextFile = co_await KnownFolders::Pictureslibrary().GetFileAsync(L"Freesample.svg");
fileStream = co_await nextFile.OpenReadAsync();
SvgImageSource sourcee = SvgImageSource();
co_await sourcee.SetsourceAsync(fileStream);
MyImage().Source(sourcee);
我当前的搜索功能如下:
public enum NSurname
{
JohnDoe,PeterSmith
}
public class RaidRequest
{
public int Id { get; set; }
public Permissions access { get; set; }
public Group UserOrAdmin { get; set; }
public string Department { get; set; }
public NSurname NameSurname { get; set; }
public string Reason { get; set; }
public string UNCPath { get; set; }
}
这就是我的控制器中的外观
<form asp-controller="Raidrequests" asp-action="Index" method="get">
<p>
Search: <input type="text" name="SearchString">
<input type="submit" value="Filter" />
</p>
我可以使它与字符串Reason,UNCPath或Department一起使用,但不能与枚举一起使用。 当我尝试使用枚举时会出现此错误:
CS1929 C#不包含“包含”的定义,并且最佳扩展方法重载需要类型的接收器