private User GetCurrentUserFromb(PhraseWithMailToSave input) { Log.LogInformation("\nGet current user from db:\n"); return(db.Users .FirstOrDefault(u => u.Email == input.Mail)); }
private Saving CreateNewSaving(User user, PhraseWithMailToSave inputObject) { var dateOfSave = DateTime.Now; var saving = new Saving() { CalculationValue = RemoveWhiteSpaces(input: inputObject.PhraseToSave), DateOnServer = dateOfSave, DateOnClient = inputObject.DateOnClient, UserId = user.Id }; return(saving); }