Using C# Expression Trees in ASP.NET Controllers (A PRACTICAL EXAMPLE)

  Рет қаралды 5,428

Code It Up by AMBITIONED

Code It Up by AMBITIONED

Күн бұрын

Пікірлер: 26
@ikirachen
@ikirachen 5 жыл бұрын
Totaly agree. The slow part of the reflection is SetValue. Analizing types and methods is look up over cached values :)
@VarunTeja
@VarunTeja 3 жыл бұрын
This is amazing, learnt lot of things by this video.
@ekashkash
@ekashkash 4 жыл бұрын
Awesome presentation. Thank you!
@TestTest-wl8ep
@TestTest-wl8ep 5 жыл бұрын
if i have a async Action as redirectExpression i get a Warning. How can i remove that warning?
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
testest jzjgjzgjf I mentioned it in the video at one point - make another overload of the method, which uses Expression instead of the action. I will start uploading the examples in GitHub for easier copy-paste.
@TestTest-wl8ep
@TestTest-wl8ep 5 жыл бұрын
@@CodeItUpByAMBITIONED thank you
@superpcstation
@superpcstation 5 жыл бұрын
Hi, really appreciate that you are taking the time to make these. I have only skimmed through your videos and i have a suggestion. It would be nice if you could speed up the footage at unnecessary parts like loading, launching, writing simple code etc. Thanks for all the effort :)
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
This is a great idea. I will implement it in the future. Thank you for the feedback! As for now, you can watch the whole video on 1.5 speed fo example.
@ЛюбомирГеоргиев-о5й
@ЛюбомирГеоргиев-о5й 5 жыл бұрын
I firmly believe, that showing this "unnecessary parts like loading, launching, writing simple ..." is showing exactly how code was, and should be, written. And when you see how Ivo is also making mistakes and fixing them is more precious than just showing you the final code. If you do not want to see the creation path you can go to ASP.NET project and look around their code.
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
I believe he is talking about VS loading times and other not useful parts of the video. As for code errors an debugging - I believe they are useful because such errors show how an experienced developer solves problematic code.
@zurasamkharadze4388
@zurasamkharadze4388 4 жыл бұрын
This lecture is also great, but the reason why I am interested in Expressions is that, I want to know how Can I work with expressions in anonymous types linq queries, can you link if you have such lecture, please?
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 4 жыл бұрын
Can you give me an example of what are you trying ti accomplish, and I will help you (or create a video about it).
@zurasamkharadze4388
@zurasamkharadze4388 4 жыл бұрын
Thank you for your help. Lets say, one recruiter asked me if I knew how to work with a Linq query, Which type is anonymous (not specified type), after that he asked if I ever worked with expressions. From that I want to understand, how can I work with the type of query, which is not specified for me.
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 4 жыл бұрын
@@zurasamkharadze4388 Is is an anonymous or a generic type, which you do not know during compile time? Because there is a huge difference and in practice - usually anonymous types in the expression trees are not that common.
@zurasamkharadze4388
@zurasamkharadze4388 4 жыл бұрын
@@CodeItUpByAMBITIONED Pardon me, he mentioned generic type, not the anonymous, my mistake...
@zurasamkharadze4388
@zurasamkharadze4388 4 жыл бұрын
I Assume that he asked about this mayby... " var query = context.Groups.GetAll().AsQuerable().Include(a => a.prop).Select(c => ((TypeName)c)) " to cast it with select?
@OvRaf
@OvRaf 3 жыл бұрын
perfect
@darkened-
@darkened- 5 жыл бұрын
Love your videos, man! I have a couple of questions that are "off-topic" but gonna ask you anyways =D - What do you think about dotnet Blazor? - Is it worth developing a full stack web app at this point? - Do you plan to make a video regarding this topic? I think it would be really helpful and awesome! Thanks in advance! Keep it up =P
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
Kristian Bashev Thank you for the nice words. I will do a Blazor video when it is completely ready for production and not in a preview state. For now I prefer using React or Angular for the front-end, but Blazor will be a great way to build SPA applications in the near future. We just need to wait a bit until it is mature enough. I have a friend who is using it in production and he is happy with it, however. It’s a matter of dev recourses and knowledge, but if you like it - go for it!
@darkened-
@darkened- 5 жыл бұрын
​@@CodeItUpByAMBITIONED Thank you for the quick and detailed response, I do really appreciate it!
@ikirachen
@ikirachen 5 жыл бұрын
Another thing. Why redirect, wehn we can just call the controller action method ? Yeah it will not be reflected in the browser as 302 redirect, butt we will achieve the same result.
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
In a lot of situations, you will want to have an actual HTTP redirect. For example, after a form post, you do not want the user to be able to hit refresh and send the data again.
@ikirachen
@ikirachen 5 жыл бұрын
@@CodeItUpByAMBITIONED note accepted :)
@CodeItUpByAMBITIONED
@CodeItUpByAMBITIONED 5 жыл бұрын
Glad I could help! 🙏
SUPER Fast Object Creation with C# Expression Trees - Part 1 - Empty Constructor
16:27
C# DELEGATES for Dummies
22:22
Code It Up by AMBITIONED
Рет қаралды 29 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
C# Expression Trees are NOT SCARY (Let's Start with the Basics)
1:08:26
Code It Up by AMBITIONED
Рет қаралды 24 М.
C# ACTION and FUNC for Dummies
16:16
Code It Up by AMBITIONED
Рет қаралды 15 М.
Using C# Expression Trees in the Real World - Spencer Schneidenbach
50:57
Dependency Injection in .NET Core (.NET 6)
1:00:32
IAmTimCorey
Рет қаралды 196 М.
What Happened in Syria is SHOCKING & No One’s Allowed To Talk About It
11:44
Using C# Expression Trees in the Real World - Spencer Schneidenbach
50:56
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН