since I have a project in which I am not using Async, I have searched about Refit alternative for Synchronous type-safe RestApi call but not found anything
please anyone can give any idea or suggestion which one I can use.
Related
I have just started using SharpRepository to replace our current GenericRepository in my .NET Core project. It's an API project which need to handle large amount of concurrent requests. However, I could not find any implementation for asynchronous operations. Is there any specific reason for that? Should I just wrap synchronous SharpRepository operations in a Task run if I want to go asynchronous all the way?
The answer is this here: https://github.com/SharpRepository/SharpRepository/issues/53#issuecomment-18109624
To make a good work we need to develop async methods for all implementations (EF, Mongo ...). Not easy. If you can help make a PR!
I'm starting to rebuild my app to MvvmCross, but I hit a small roadblock. It seems the community plugin for SQLite doesn't support async connection and querying. WinRT requires data access and other long-running operations to be performed asynchrnously, so this seems like an issue (although I think it is safe to say, that normal operations won't take that long to make this matter). I just wanted to ask, if asynchronous support is somehow possible to add and if this feature will be somehow added in future releases.
Thank you all very much!
Don't use the mvvmcross sqlite plugin. Instead use the PCL compatible "sqlite.net pcl". It has both sync and async versions.
github:
https://github.com/oysteinkrog/SQLite.Net-PCL
nuget:
http://www.nuget.org/packages/SQLite.Net-PCL/
The cg+sql branch of my fork contains provisions to use Async in mvvmcross-sqlite
https://github.com/loqu8/mvvmcross-sqlite/tree/cg+sql
Take a look and see if it works for you. It is based on sqlite-net Async.
Please look at TODOs in MvvmCross Sqlite-Net (https://github.com/MvvmCross/MvvmCross-SQLite) readme file. The first one:
add Async - #Praeclarum and #Jarroda have already done the 'hard work'
- we just need to work out how to include it - do we switch to Profile78? Do we drop WP7.5? Do we hack in AsyncBridge somehow?
So it seems that we will get Async support some day and will get even more fun from using MvvmCross! :-)
For now it seems that the only solution is to create low-level data access interface with save/load/find methods and implement it in platform-specific projects.
I have been attempting to find a good implementation of Json rpc in wcf, but I have not had much luck yet.I have found several examples of implementations using jayrock and Json-rpc.net, but I would prefer to work within wcf as much as possible.
Has anyone ever developed a Json rpc server within wcf? If so, could you point me towards some example code or documentation?
Any help would be greatly appreciated!
It is a reasonable scenario. I'm not sure how to do it with WCF, but I think Web API is the way to go. Also from Microsoft.
From the question here, There are two external libraries to use for http operation. It seems that dispatch has more visibility while scalaj-http is easy to use as stated there. Thus, I am more inclined toward scalaj-http. I want to use the http library in google app engine, where there are restraints. For standard Java, there is a work around for it from here. I would like to get advice on what would be the best approach to use Scala in Google app engine(this is not for Lift framework).
I personally am very happy with Dispatch. There are several executors, including one for App Engine, dispatch-gae.
What's the best way to log in ASP.net MVC? I mean any event, I'm currently using NLog but I know there are a lot of possible ways to do it.
I use log4net, its quite good. There are some issues to be aware of, you can learn more about them here. I also recommend Elmah, for me I use it on every project I do, its a prerequisite.
I don't think there is a best framework/tool or standard way in ASP.net MVC. Just do it the way you would in any other framework. When I set up logging, I usually think of it as a resource available to the rest of the application, rather than being tied to a particular tier. This is common, and in fact logging is the standard example given when introducing Aspect Oriented Programming. See:
Logging mentioned in the wikipedia entry on AOP
Another AOP into that uses logging as the example
Depending on what exactly you're trying to log, consider using action filters; a great way to log what page requests are made and for error handling coverage. Non-MVC asp.net apps usually do something in the global.asax, as mentioned here. In fact, even if you use the action filters, which I would suggest, also include some basic error handling in the global.asax 's application_error event; it will fire a little more dependably than the action filters if something really crazy happens.
Other than that, call your logging resource at the point where the stuff happens that's interesting to you. DB or File? Either works, and as long as it's encapsulated in a good method or two, you can always switch that later.