-
Notifications
You must be signed in to change notification settings - Fork 125
Home
Thang Chung edited this page Jul 13, 2019
·
15 revisions
New name for AdminLTE on Blazor should be BladminLTE
- https://buttercms.com/docs/api-client/dotnet
- https://github.com/rla/blog-core
- https://github.com/ahmadassaf/blog-core
public IObservable<dynamic> GetVideoGridForDisplay(int userId)
{
return GetListOfLists(userId).SelectMany(list =>
{
return list.Videos()
.Take(10)
.SelectMany(video =>
{
var m = video.Metadata().Select(md => new { title = md["title"], length = md["duration"] });
var b = video.Bookmark(userId).Select(bookmark => bookmark);
var r = video.Rating(userId).Select(rating => new
{
actual = rating.ActualStarRating(),
average = rating.AverageStarRating(),
predicted = rating.PredictedStarRating()
});
return Observable.Zip(m, b, r, (metadata, bookmark, rating) =>
{
return new
{
id = video.VideoId,
metadata.title,
metadata.length,
bookmark,
rating
};
});
});
});
}
// https://dzone.com/articles/5-things-to-know-about-reactive-programming
manager.getCampaignById(id)
.flatMap(campaign ->
manager.getCartsForCampaign(campaign)
.flatMap(list -> {
Single<List<Product>> products = manager.getProducts(campaign);
Single<List<UserCommand>> carts = manager.getCarts(campaign);
return products.zipWith(carts,
(p, c) -> new CampaignModel(campaign, p, c));
})
.flatMap(model -> template
.rxRender(rc, "templates/fruits/campaign.thl.html")
.map(Buffer::toString))
)
.subscribe(
content -> rc.response().end(content),
err -> {
log.error("Unable to render campaign view", err);
getAllCampaigns(rc);
}
);
- List of functions for Repository at here
public interface IRepository<TEntity> : IDisposable
where TEntity : class
{
bool IsDisposed { get; }
TEntity Find(params object[] keyValues);
TEntity Find(Expression<Func<TEntity, bool>> filter,
Expression<Func<TEntity, object>>[] include = null);
Task<TEntity> FindAsync(Expression<Func<TEntity, bool>> filter,
Expression<Func<TEntity, object>>[] include = null);
IQueryable<TEntity> Query(Expression<Func<TEntity, object>>[] include = null);
TEntity Create();
TEntity Create(TEntity value);
bool Update(TEntity value);
void Delete(TEntity value);
void Delete(IEnumerable<TEntity>entities);
void Reset(TEntity value);
Task ResetAsync(TEntity value);
}
- Add version for the Assembly
// reference at https://github.com/GaProgMan/dwCheckApi/blob/master/dwCheckApi/Controllers/VersionController.cs
Assembly.GetEntryAssembly()
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
.InformationalVersion;
- locust - An open source load testing tool, and we have the advanced example at https://github.com/microservices-demo/load-test