tangyblazor's People
Forkers
chtbof agyesam toddforsberg tanviredu nawazprince abishekc301 fahiadome ysprabhu playwithfire sergey196970 mrcreative808 bangush 43vision andybrizhak brekooname danielserek okanuluoglu sandyw219 zeeshanejaz786 rlllup0084 oniger913 packtpublishing hartl3y94 mrlearnner innocentalfredo yinfinite sdifiore won5572 guoangel fboundou amryousry21 wengefan digitalrexx ifeanyiokagbue naveenkumargc ritzy121 advivedi9 parmidasoftdeveloper prasadmcts practicesprojects sagar-timalsena barrydidaho viparvez lechpor rechazar dotnet-ref-mm2 godaften bionstt 4bitsteams baushaug jaridmck vaishnavipandey-vp pepetronik lucasaqa now37 abhilashlegend boski saif435 yauchinlam scrystalcave zdtang luzwales rafaelqueiroz89 sushilspai parmidasoftdev miryasha dharmendraksaini emmanuelboucicaut bhattimohsin navkor sachindewan shivani1406 thiagodosreis gamilyassin kristianreyes7 ricklearnstocode supunjayaweera abhikasam stephanhuewe karimmoustamid watl joygenzhang abrantesandreza iraklirost altantawi eblis2182014 sateesh6600 arafatbd foodcoder86 hombreoso jothiprakash111 htdungvnn surajit1986tangyblazor's Issues
using a class initializer for collection in EF's class
The Product class didn't use a class initializer, is it better to use an initializer like the one below?
public Product()
{
ProductPrices = new HashSet();
}
Connection Refused
I have an issue:
First, the error.
:7028/api/product:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
And the code:
public async Task<IEnumerable<ProductDTO>> GetAll()
{
var response = await _httpClient.GetAsync("/api/product"); // This is the line getting the error.
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
var products = JsonConvert.DeserializeObject<IEnumerable<ProductDTO>>(content);
foreach(var prod in products)
{
prod.ImageUrl=BaseServerUrl+prod.ImageUrl;
}
return products;
}
return new List<ProductDTO>();
This is the CORS allowance in the program.cs file:
builder.Services.AddCors(o => o.AddPolicy("Tangy", builder =>
{
builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader();
}));
app.UseCors("Tangy");
appsettings.json:
{
"BaseAPIUrl": "https://localhost:7028",
"BaseServerUrl": "https://localhost:44355"
}
This is the base address:
and this is the API address:
The API is working.
client won't run
The client won't run in latest software version
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: TypeError: Failed to fetch
System.Net.Http.HttpRequestException: TypeError: Failed to fetch
---> System.Runtime.InteropServices.JavaScript.JSException: TypeError: Failed to fetch
at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
virtual class in EntityFramework
In ProductPrice class used Product without a virtual word, which one is better?
1- "public Product Product { get; set; }" ?
2- "public virtual Product Product { get; set; }" ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.