private void InitStructureMap() { ObjectFactory.Initialize(x => { x.For<IUnitOfWork>().HybridHttpOrThreadLocalScoped().Use(() => new MyDbContext()); x.For<IRequestService>().Use<RequestService>(); x.For<IRequestTypeService>().Use<RequestTypeService>(); x.For<IUnitService>().Use<UnitService>(); x.For<IDomainService>().Use<DomainService>(); }); ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory()); ObjectFactory.Initialize(cfg => { cfg.For<IDependencyResolver>().Singleton().Add<StructureMapDependencyResolver>(); // the rest ... cfg.For<IUnitOfWork>().HybridHttpOrThreadLocalScoped().Use(() => new MyDbContext()); cfg.For<IRequestService>().Use<RequestService>(); cfg.For<IRequestTypeService>().Use<RequestTypeService>(); cfg.For<IUnitService>().Use<UnitService>(); cfg.For<IDomainService>().Use<DomainService>(); }); GlobalHost.DependencyResolver = ObjectFactory.GetInstance<IDependencyResolver>(); }
5 JavaScript Security Best Practices for 2024
Any JavaScript web application needs to have a Content Security Policy (CSP), a browser security standard that dictates what the browser is allowed to load — whether that be a domain, subdomain, or resource. Without a CSP, hackers can exploit cross-site scripting vulnerabilities, potentially resulting in a data breach.
مقایسهی Blazor و Vue
If you're comfortable with JavaScript and the ecosystem, Vue is a solid framework which can easily scale up or down as your application requires.
On the other hand, if you already know and enjoy using C#, and have generally found JavaScript (the language and ecosystem) difficult to learn and live with, Blazor WASM is potentially a game changer.
آموزش تایپاسکریپت در ۳۰ دقیقه
Today we're going to take a look at TypeScript, a compile-to-JavaScript language designed for developers who build large and complex apps. It inherits many programming concepts from languages such as C# and Java that add more discipline and order to the otherwise very relaxed and free-typed JavaScript
It’s a library. And therefore you can attach any javascript library of your choice as add-ons
State Management is more flexible
JSX syntax blends well together with javascript
Faster learning curve
Modern Web Development is challenging and the way we develop web apps are now different than before
You can reuse components effortlessly because they’re all just pure functions
To help you enjoy this creativity from the community, every month or two I’ll be introducing some of the new extensions that caught my eye. Here are the highlights for this month:
- UWP Tile Generator (great helper for UWP developers)
- Open Bin Folder Extension (nice and simple)
- DocPreview (Preview XML comments)
- JavaScript Snippet Pack (Code snippets for JavaScript developers)
بررسی C# Object Notation
کتابخانه Gijgo
ASP.NET MVC #12
<script src="../../Scripts/jquery-1.9.1.min.js" type="text/javascript"></script> <script src="../../Scripts/jquery.price_format.2.0.js" type="text/javascript"></script>
ولی باز هم نتیجه نگرفتم. میشه لطف کنید راهنمائیم کنید که چطور از اون مثال استفاده کنم؟