public void AddWeight(Weight weight) { weight.LastModifiedDateUtc = DateTime.UtcNow; weight.CreatedDateUtc = DateTime.UtcNow; weight.LastModifiedBy = 1; _repository.Create(weight); }
private int AddWeightTo(int?postId, int?commentId, int amount) { var weight = new Weight { Amount = amount, Created = DateTime.Now, }; var user = _userContext.GetCurrentUser(); return(_weightRepository.Create(postId, commentId, weight, user.Id)); }