Blazor - Master-Detail -  Adding, Editing and Deleting Related Entities - Entity Framework Core

Blazor - Master-Detail - Adding, Editing and Deleting Related Entities - Entity Framework Core

Programming with Felipe Gavilan

4 года назад

8,097 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@angeloangeloqquiambao406
@angeloangeloqquiambao406 - 21.06.2023 01:23

This helped me a lot. Thank you.

Ответить
@paultechguy
@paultechguy - 18.08.2021 06:29

Very straightforward, very nice. Glad to see someone shows an up-to-date way to update both the parent and a child object.

Ответить
@shahinmohaghegh
@shahinmohaghegh - 16.04.2021 08:10

Could you make a table for the objects in details

Ответить
@mrAbbas381366
@mrAbbas381366 - 16.10.2020 22:43

biggest problem in blazor is it can return file to client and need some controller api to do that ... please learn how real time generate some file and get that file to client

Ответить
@doorscomputersco.5713
@doorscomputersco.5713 - 31.05.2020 01:29

It would be of great help if you can make a Udemy video on how to create an Invoicing application that manages Inventory, Customers Credit, Customer Payments Email, Invoice, Send SMS, for sure you will have many students in the future

Ответить
@Sammy0021
@Sammy0021 - 07.05.2020 15:56

I have written code and it is rendering the inputselect but with no items in the list...


internal RenderFragment CreateCustomEditor(KeyValuePair<string,object> cEditor) => builder =>
{
if (cEditor.Value is ComboBoxEdit)
{
var c = cEditor.Value as ComboBoxEdit;

PropertyInfo prop = mItem.GetType().GetProperty(c.FieldName);

builder.OpenComponent(0, typeof(InputSelect<string>));

var value = prop.GetValue(mItem);

builder.AddAttribute(1, "Value", value);
builder.AddAttribute(2, "class", "form-control h-100 w-100");

builder.AddAttribute(4, "ValueChanged",
RuntimeHelpers.TypeCheck<EventCallback<String>>(EventCallback.Factory.Create<String>
(this, EventCallback.Factory.CreateInferred
(this, __value => prop.SetValue(mItem, __value),
(string)prop.GetValue(mItem)))));

// Create an expression to set the ValueExpression-attribute.
var constant = System.Linq.Expressions.Expression.Constant(mItem, mItem.GetType());
var exp = System.Linq.Expressions.MemberExpression.Property(constant, c.FieldName);

var lamb = System.Linq.Expressions.Expression.Lambda<Func<string>>(exp);

builder.AddAttribute(5, "ValueExpression", lamb);

builder.OpenElement(6, "Option");
builder.AddAttribute(7, "Value", "Wild");
builder.AddContent(8, "Wild");
builder.CloseElement();

//builder.AddMarkupContent(6, "<option value=\"Wild\">Wild</option>");
//builder.AddMarkupContent(7, "<option value=\"Common\">Common</option>");

builder.CloseComponent();

@*<InputSelect Id="name" Class="form-control" @bind-Value="@(mItem.GetType().GetProperty("PetType"))">
<option value="Wild">Wild</option>
<option value="Domestic">Domestic</option>
<option value="Common">Common</option>
</InputSelect>*@
}

};

Ответить
@Sammy0021
@Sammy0021 - 07.05.2020 15:55

Hi
Kindly can u make a video on how to render manually inputselect using rendertreebuilder ?

Ответить