Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ldqk committed Mar 1, 2020
1 parent de1d687 commit ad21556
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,17 @@ var selector = new WeightedSelector<string>(new List<WeightedItem<string>>()
var item = selector.Select();//按权重选出1个元素
var list = selector.SelectMultiple(3);//按权重选出3个元素
```
### 35.EF Core支持AddOrUpdate方法
```csharp
/// <summary>
/// 按Id添加或更新文章实体
/// </summary>
public override Post SavePost(Post t)
{
DataContext.Set<Post>().AddOrUpdate(t => t.Id, t);
return t;
}
```

# Asp.Net MVC和Asp.Net Core的支持断点续传和多线程下载的ResumeFileResult

Expand Down

0 comments on commit ad21556

Please sign in to comment.