« first day (3760 days earlier)      last day (1203 days later) » 

mr5
2:40 AM
@juanvan oic, but I could expose it through API also. So the best practice is have them shared right?
 
 
12 hours later…
3:08 PM
Ya have them shared @mr5 Why people use just an API for the whole system usually.
 
3:32 PM
try to understand if there is a chat or discord for asp.net core
 
4:02 PM
Is a discord for this channel
@Serge you can ask any .net question here
 
4:21 PM
[serge] @juanvan asked my question in #general-csharp chat, also here stackoverflow.com/q/65974070/961631
 
4:54 PM
[juanvan] So seems like you're just not Walking the Model correctly
\[**[juanvan](https://discord.gg/PNMq3pBSUe)**] <select asp-for="BarTypeId"
asp-items="@(new SelectList(ViewBag.BarTypes,
"Id", "Name"))">
<option value="">please select</option>
</select> IS what you have
[serge] yes
 
 
4 hours later…
8:27 PM
\[**[juanvan](https://discord.gg/PNMq3pBSUe)**] <select asp-for="BarType.Id" asp-items="@(new SelectList(ViewBag.BarTypes, "Id", "Name"))">
<option value="">please select</option>
</select>
[juanvan] whoops I didn't sent that
[juanvan] Sorry about that
[juanvan] So the Model is BarType
[juanvan] Then you want the property ID
 
 
1 hour later…
9:52 PM
[serge] solved partially the problem adding TypeId to the DTO object as well as the Type properties, and asp-for="TypeId"
 
10:08 PM
\[**[serge](https://discord.gg/PNMq3pBSUe)**] another question was how to retrieve the table name from the EF configuration

`public class IdEntityConfiguration : BaseEntityConfiguration<IdEntity>
{
public override void Setup(EntityTypeBuilder<IdEntity> builder)
{
builder.Property(p => p.Id)
.HasColumnName(p=> 'TABLENAME' + "Id");
}
}`
[juanvan] The Table name? Usually it's the name of the DBSet
[serge] yes
[serge] but i need the entityname, not dbset name
[serge] is there a way to retrieve the entity table name in that method?
[juanvan] The way you have the wrote, It looks like you're searching a ColumnNamed TableName+ID
[serge] I need the Id of the Country to be named "CountryId"
[juanvan] ok
[serge] DbSet<Country> Countries
[juanvan] dbContext.Countries.Where(p =>
[juanvan] prp
[juanvan] brb
[serge] I haveno dbContext in that method
[serge] I configure a generic entity
 

« first day (3760 days earlier)      last day (1203 days later) »