This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <uses-permission android:name="android.permission.READ_CONTACTS" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Xamarin.Forms; | |
| namespace Controls | |
| { | |
| public class CheckBox : StackLayout | |
| { | |
| BoxView boxBackground = new BoxView { HeightRequest = 25, WidthRequest = 25, BackgroundColor = Color.LightGray, VerticalOptions = LayoutOptions.CenterAndExpand }; | |
| BoxView boxSelected = new BoxView { IsVisible = false, HeightRequest = 18, WidthRequest = 18, BackgroundColor = Color.Accent, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.Center }; | |
| Label lblSelected = new Label { Text = "✓", FontSize=19, FontAttributes= FontAttributes.Bold, IsVisible = false, TextColor = Color.Accent, HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.CenterAndExpand }; | |
| Label lblOption = new Label { VerticalOptions = LayoutOptions.CenterAndExpand , FontSize = 14 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <PropertyGroup> | |
| <TargetFramework>netcoreapp3.1</TargetFramework> | |
| </PropertyGroup> | |
| <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.2'"> | |
| <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" /> | |
| <!-- your .net core 2.2 dependencies here --> | |
| </ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if NETCOREAPP2_2 | |
| using Microsoft.AspNetCore; | |
| #endif | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.Extensions.Hosting; | |
| namespace Sample.WebService | |
| { | |
| public class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Startup | |
| { | |
| public Startup(IConfiguration configuration) | |
| { | |
| Configuration = configuration; | |
| } | |
| public IConfiguration Configuration { get; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ProductsController | |
| { | |
| private readonly MyDbContext context | |
| public ProductsController(MyDbContext context) | |
| { | |
| this.context = context; | |
| } | |
| [HttpGet] | |
| public async Task<IActionResult> GetAsync([FromQuery]SomeDto filter) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Product | |
| { | |
| public string Id { get; set; } | |
| public string Name { get; set; } | |
| public string Code { get; set; } | |
| public string Description { get; set; } | |
| public decimal Price { get; set; } | |
| public decimal? ShippingPrice { get; set; } | |
| public int Stock { get; set; } | |
| public DateTime CreateDate { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var query = db.Products.Where(x => x.Code == filter.Code); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // x => | |
| var parameter = Expression.Parameter(typeof(Product), "x"); | |
| // x => x.Code | |
| var property = Expression.Property(parameter, "Code"); | |
| // x.Code == filter.Code | |
| var comparison = Expression.Equal(property, Expression.Constant(filter.Code)); | |
| var lambda = Expression.Lambda<Func<Product, bool>>(comparison, parameter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var query = db.Products.Where(x => x.Name.Contains(filter.Name)) |
OlderNewer