فایل ARCHITECTURE.md
200, OK
https://matklad.github.io//2021/02/06/ARCHITECTURE.md.html icon

If you maintain an open-source project in the range of 10k-200k lines of code, I strongly encourage you to add an ARCHITECTURE document next to README and CONTRIBUTING. Before going into the details of why and how, I want to emphasize that this is not another “docs are good, write more docs” advice. I am pretty sloppy about documentation, and, eg, I often use just “simplify” as a commit message. Nonetheless, I feel strongly about the issue, even to the point of pestering you:-) 

فایل ARCHITECTURE.md
استفاده از MVVM در ASP.NET Core
200, OK
https://www.dotvvm.com/ icon

Open source MVVM framework for ASP.NET Core and OWIN 

View

@viewModel DotvvmDemo.CalculatorViewModel, Dotvvm
    
<p>
    Enter the first number: 
    <dot:TextBox Text="{value: Number1}" />
</p>
<p>
    Enter the second number: 
    <dot:TextBox Text="{value: Number2}" />
</p>
<p>
    <dot:Button Text="Calculate" Click="{command: Calculate()}" />
</p>
<p>
    The result is: {{value: Result}}
</p>

ViewModel

using System;
    
namespace DotvvmDemo 
{
    public class CalculatorViewModel 
    {
            
        public int Number1 { get; set; }
            
        public int Number2 { get; set; }
            
        public int Result { get; set; }
            
        public void Calculate() 
        {
            Result = Number1 + Number2;
        }
    }
}


استفاده از MVVM در ASP.NET Core
AutoMapper 8.1.0 منتشر شد
302, Found
https://jimmybogard.com/automapper-8-1-0-released/ icon

AutoMapper 8.1 adds a major new feature - attribute-based maps. Attribute maps let you easily declare maps on destination types when you have straightforward scenarios. Instead of: 


public class OrderProfile {  
    public OrderProfile() {
        CreateMap<Order, OrderIndexModel>();
        CreateMap<Order, OrderEditModel>();
        CreateMap<Order, OrderCreateModel>();
    }
}


You can declare your type maps directly on the destination types themselves with AutoMapAttribute: 


[AutoMap(typeof(Order))]
public class OrderIndexModel {  
    // members
}

[AutoMap(typeof(Order))]
public class OrderEditModel {  
    // members
}

[AutoMap(typeof(Order))]
public class OrderCreateModel {  
    // members
}


AutoMapper 8.1.0 منتشر شد