public static RecordModel FromRecord(Record record) { return(new RecordModel { Id = record.Id, Note = record.Note, Account = AccountModel.FromAccount(record.Account), RecordType = record.RecordType, PaymentType = PaymentTypeModel.FromPaymentType(record.PaymentType), Category = CategoryModel.FromCategory(record.Category), DateAdded = record.DateAdded, Amount = record.Amount, }); }